title: How can I access field value by it's offset in C#
body: <pre><code>public class Test
  {
      int m_iInt1; // 0x0
      int m_iInt2; // 0x4
  }
  </code></pre>
  
  <p>Is this possible in C# to access a field like this:</p>
  
  <pre><code>var inst = new Test();
  unsafe 
  {
      var reference = __makeref(inst);
      int int1 = *(int*)(reference + 0x0);
  }
  </code></pre>
  
  <p>How can I accomplish this?</p>