Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Marcin has nailed it for the specific transformation you're talking about here, with the <code>using</code> statement. However, you should also be aware of tools like <a href="http://www.red-gate.com/products/dotnet-development/reflector/" rel="nofollow noreferrer">Reflector</a> and <a href="http://www.jetbrains.com/decompiler/" rel="nofollow noreferrer">dotPeek</a> (there are many more) as well as <a href="http://msdn.microsoft.com/en-us/library/f7dy01k1.aspx" rel="nofollow noreferrer">ildasm</a>. </p> <p>Reflector and dotPeek will decompile your code back from the compiled code to C#, with various levels of "optimization" (how hard it tries to do the C# compiler's transformation, basically) and they also allow you to see the IL - which is what <code>ildasm</code> gives you too.</p> <p>The IL gives you the ultimate answer about what the compiled code looks like, but often looking at the decompiled code (particularly with "optimizations" turned off, or setting the decompiler to provide C# 2 code for example) can be simpler.</p> <p>It's worth being aware that many of the transformations performed by the compiler will use "unspeakable names" for extra types, fields and methods that are generated. For example if you have:</p> <pre><code>Action foo = () =&gt; Console.WriteLine("I'm a lambda!"); </code></pre> <p>then that may generate a method called something like <code>&lt;Main&gt;b__0</code>. You wouldn't be able to refer to this in normal C# (as a C# identifier can't include <code>&lt;</code> or <code>&gt;</code>) but it's valid IL.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload