{"id":31,"date":"2014-07-25T10:22:33","date_gmt":"2014-07-25T10:22:33","guid":{"rendered":"http:\/\/mairwa.com\/wordpress\/?p=31"},"modified":"2014-07-25T10:22:33","modified_gmt":"2014-07-25T10:22:33","slug":"volatile-in-net-vb-and-c","status":"publish","type":"post","link":"http:\/\/mairwa.com\/wordpress\/?p=31","title":{"rendered":"volatile in .net vb and C#"},"content":{"rendered":"<p>http:\/\/msdn.microsoft.com\/en-us\/library\/x13ttww7.aspx<\/p>\n<p>The\u00a0volatile\u00a0modifier is usually used for a field that is accessed by multiple threads without using the\u00a0lock\u00a0statement to serialize access.<\/p>\n<p>The\u00a0volatile\u00a0keyword can be applied to fields of these types:<\/p>\n<ul>\n<li>Reference types.<\/li>\n<li>Pointer types (in an unsafe context). Note that although the pointer itself can be volatile, the object that it points to cannot. In other words, you cannot declare a &#8220;pointer to volatile.&#8221;<\/li>\n<li>Types such as sbyte, byte, short, ushort, int, uint, char, float, and bool.<\/li>\n<li>An enum type with one of the following base types: byte, sbyte, short, ushort, int, or uint.<\/li>\n<li>Generic type parameters known to be reference types.<\/li>\n<li>IntPtr\u00a0and\u00a0UIntPtr.<\/li>\n<\/ul>\n<p>The volatile keyword can only be applied to fields of a class or struct. Local variables cannot be declared\u00a0volatile.<\/p>\n<p><span style=\"font-size:16px;line-height:24px;\">volatile not in vb.net<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">http:\/\/msdn.microsoft.com\/en-us\/library\/x13ttww7.aspx The\u00a0volatile\u00a0modifier is usually used for a field that is accessed by multiple threads without using the\u00a0lock\u00a0statement to serialize access. The\u00a0volatile\u00a0keyword can be applied to fields of these types: Reference types. Pointer types (in an unsafe context). Note that although the pointer itself can be volatile, the object that it points to cannot. In other words, you cannot declare a&hellip; <a href=\"http:\/\/mairwa.com\/wordpress\/?p=31\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,7,16],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-c-vb","category-c","category-vb-net","xfolkentry"],"_links":{"self":[{"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31"}],"version-history":[{"count":0,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mairwa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}