title: C# System.TypeInitializationException When Generic Types used
body: <p>I am getting a System.TypeInitializationException in C# when i try to call the following:</p>
  
  <pre><code>List&lt;BuyShopItem&gt; buyShopItemList = new List&lt;BuyShopItem&gt;(0);
  </code></pre>
  
  <p><code>BuyShopItem</code> is in an external assembly and contains the following:</p>
  
  <pre><code>namespace GameProtocol
  {
      public struct BuyShopItem
      {
          public int ShopItemID;
          public int Amount;
          public int GoldPrice;
          public int SilverPrice;
          public int CharacterPointPrice;
          public int ResearchPointPrice;
      }
  }
  </code></pre>
  
  <p>It's probably because of the external assembly, right?</p>
  
  <p>Unfortunately, i cannot change it as i need to pass the <code>BuyShopItem</code> back again to another external Assembly.</p>
  
  <p>Some information about the assembly: It's from a Unity game, .NET 3.5 (according to DotPeek: <code>msil, .Net Framework v3.5</code>)</p>
  
  <p>I'm having the issue in SharpDevelop as well as Visual Studio 2017, so it probably not IDE-related.
  Result of <code>peverify</code>:</p>
  
  <pre><code>Microsoft (R) .NET Framework PE Verifier. Version  4.0.30319.0
  Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
  
  [MD]: Error: Field has a duplicate, token=0x040059d7. [Token:0x040059CF]
  [MD]: Error: Field has a duplicate, token=0x040059cf. [Token:0x040059D7]
  [MD]: Error: Field has a duplicate, token=0x0400a48b. [Token:0x0400A478]
  [MD]: Error: Field has a duplicate, token=0x0400a478. [Token:0x0400A48B]
  4 Fehler wird/werden überprüft Assembly-CSharp.dll
  </code></pre>
  
  <p>If you have any Hints of what it could be, please tell me. I will try it out as soon as i can.</p>
  
  <p>Here is a screenshot of the Exception in Visual Studio 2017:
  <a href="https://i.imgur.com/WHCbWTM.png" rel="nofollow noreferrer">https://i.imgur.com/WHCbWTM.png</a></p>
  
  <p>Update: I just tried the following: <code>Console.WriteLine(typeof(BuyShopItem));</code>, same error occured. Why isn't it possible to get the type?</p>