title: Are there other ways of calling an interface method of a struct without boxing except in generic classes?
body: <p>see code snippet</p>
  
  <pre><code>public interface I0
  {
      void f0();
  }
  public struct S0:I0
  {
      void I0.f0()
      {
  
      }
  }
  public class A&lt;E&gt; where E :I0
  {
      public E e;
      public void call()
      {
          e.f0();
      }
  }
  </code></pre>
  
  <p>here is IL code for call()</p>
  
  <pre><code>.maxstack 8
  L_0000: ldarg.0 
  L_0001: ldflda !0 Temp.A`1&lt;!E&gt;::e
  L_0006: constrained !E
  L_000c: callvirt instance void Temp.I0::f0()
  L_0011: ret 
  </code></pre>
  
  <p>see reference for <a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.constrained.aspx">constrained</a></p>
  
  <blockquote>
    <p>The constrained prefix can also be used for invocation of interface methods on value types, because the value type method implementing the interface method can be changed using a MethodImpl. If the constrained prefix is not used, the compiler is forced to choose which of the value type's methods to bind to at compile time. Using the constrained prefix allows the MSIL to bind to the method that implements the interface method at run time, rather than at compile time.</p>
  </blockquote>
  
  <p>That means it will call one method containing interface method code of f0 without boxing the struct.</p>
  
  <p>Do any other ways caling interface method without boxing exist as above GenericClass in C#?</p>