title: How can Type int[] implement interfaces that do not yet exist (for me)?
body: <p>Today I tested the following code in Visual Studio 2010 (.NET Framework version 4.0)</p>
  
  <pre><code>Type[] interfaces = typeof(int[]).GetInterfaces();
  </code></pre>
  
  <p>And I was shocked to find these two on the list:</p>
  
  <blockquote>
    <p>System.Collections.Generic.IReadOnlyList`1[[System.Int32, mscorlib,
    Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]],
    mscorlib, Version=4.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089</p>
    
    <p>System.Collections.Generic.IReadOnlyCollection`1[[System.Int32,
    mscorlib, Version=4.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089</p>
  </blockquote>
  
  <p>I have used these two interfaces before in environments with framework 4.5+ installed, and according to the documentation, <a href="https://msdn.microsoft.com/en-us/library/hh881542(v=vs.110).aspx" rel="nofollow">both</a> <a href="https://msdn.microsoft.com/en-us/library/hh192385(v=vs.110).aspx" rel="nofollow">of</a> them were created for 4.5. This does <strong>not</strong> compile in my environment:</p>
  
  <pre><code>System.Collections.Generic.IReadOnlyList&lt;int&gt; list = new int[3];
  </code></pre>
  
  <blockquote>
    <p>The type or namespace name 'IReadOnlyCollection' does not exist in the
    namespace 'System.Collections.Generic' (are you missing an assembly
    reference?)</p>
  </blockquote>
  
  <p>When I try this:</p>
  
  <pre><code>int[] array = new int[3];
  Type iReadOnlyCollection = Type.GetType("System.Collections.Generic.IReadOnlyCollection`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
  int count = (int)iReadOnlyCollection.GetProperty("Count").GetValue(array, null);
  </code></pre>
  
  <p><code>count</code> equals 3, as expected. What is going on here?</p>
  
  <p><strong>Edit:</strong> I do not think framework 4.5 is installed on my machine:</p>
  
  <p><strong>Edit 2:</strong> Thanks @ScottChamberlain, it turns out I did have it installed.</p>