title: What can you do in MSIL that you cannot do in C# or VB.NET?
body: <p>All code written in .NET languages compiles to MSIL, but are there specific tasks / operations that you can do only using MSIL directly?</p>
  <p>Let us also have things done easier in MSIL than C#, VB.NET, F#, j# or any other .NET language.</p>
  <p>So far we have this:</p>
  <ol>
  <li>Tail recursion</li>
  <li>Generic Co/Contravariance (allowed in C# 4 and VB 10)</li>
  <li>Overloads which differ only in return types</li>
  <li>Override access modifiers</li>
  <li>Have a class which cannot inherit from System.Object</li>
  <li>Filtered exceptions (allowed in VB, and C# 6)</li>
  <li>Calling a virtual method of the current static class type.</li>
  <li>Get a handle on the boxed version of a value type.</li>
  <li>Do a try/fault.</li>
  <li>Usage of forbidden names.</li>
  <li><a href="http://msmvps.com/blogs/jon_skeet/archive/2008/12/10/value-types-and-parameterless-constructors.aspx" rel="nofollow noreferrer">Define your own parameterless constructors for value types</a>.</li>
  <li>Define events with a <code>raise</code> element.</li>
  <li>Some conversions allowed by the CLR but not by C#.</li>
  <li>Make a non <code>main()</code> method as the <code>.entrypoint</code>.</li>
  <li>work with the native <code>int</code> and native <code>unsigned int</code> types directly.</li>
  <li>Play with transient pointers</li>
  <li>emitbyte directive in  MethodBodyItem</li>
  <li>Throw and catch non System.Exception types</li>
  <li>Inherit Enums (Unverified)</li>
  <li>You can treat an array of bytes as a (4x smaller) array of ints.</li>
  <li>You can have a field/method/property/event all have the same name(Unverified).</li>
  <li>You can branch back into a try block from its own catch block.</li>
  <li>You have access to the famandassem access specifier (<code>protected internal</code> is fam<strong>or</strong>assem, but now allowed in C# 7.2 and VB 15.5)</li>
  <li>Direct access to the <code>&lt;Module&gt;</code> class for defining global functions, or a module initializer.</li>
  <li>Create and use non-zero-bound 1-based arrays</li>
  <li>Create open-instance and closed-static delegates, and delegates of getters/setters</li>
  <li>Swap two values without using a temp variable</li>
  <li>Explicit interface implementation with any name, and implementing two interface functions in one (can be done in VB)</li>
  <li><a href="https://stackoverflow.com/questions/4818850/is-is-possible-to-export-functions-from-a-c-sharp-dll-like-in-vs-c">Declaring <code>vtfixup</code> (the equivalent of <code>extern</code> in C)</a></li>
  <li>Specifying arbitrary <code>modopt</code> or <code>modreq</code></li>
  </ol>