{"id":4008,"date":"2014-03-30T07:05:37","date_gmt":"2014-03-30T07:05:37","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/hows-memory-allocated-for-a-dynamic-variable-net-4-0-collection-of-common-programming-errors\/"},"modified":"2014-03-30T07:05:37","modified_gmt":"2014-03-30T07:05:37","slug":"hows-memory-allocated-for-a-dynamic-variable-net-4-0-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/hows-memory-allocated-for-a-dynamic-variable-net-4-0-collection-of-common-programming-errors\/","title":{"rendered":"How&#39;s memory allocated for a dynamic variable .net 4.0?-Collection of common programming errors"},"content":{"rendered":"<p>A variable of type <code>dynamic<\/code> is effectively a variable of type <code>object<\/code> as far as the CLR is concerned. It only affects the <em>compiler<\/em>, which makes any operations using a <code>dynamic<\/code> expression go through execution-time binding.<\/p>\n<p>That binding process itself will use extra local variables etc (take a look in ILDASM, Reflector or something similar and you&#8217;ll be staggered) but in terms of <code>dynamicVar<\/code> itself, the code you&#8217;ve got is just like having an <code>object<\/code> variable &#8211; with appropriate boxing for the <code>int<\/code> and <code>bool<\/code> values.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A variable of type dynamic is effectively a variable of type object as far as the CLR is concerned. It only affects the compiler, which makes any operations using a dynamic expression go through execution-time binding. That binding process itself will use extra local variables etc (take a look in ILDASM, Reflector or something similar [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4008","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4008"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4008\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}