title: Why are CLR Types derived from generics not supported in SQL Server 2008 and later?
body: <p>The following code implements an UDT which derives from a generic (SortedDictionary):</p>
  
  <pre><code>[Serializable]
  [Microsoft.SqlServer.Server.SqlUserDefinedType(Format.UserDefined, MaxByteSize = 8000)]
  public class udtMassSpectra : SortedDictionary&lt;float, float&gt;, INullable, IBinarySerialize, ICloneable, IDisposable
  {
  ...
  }
  </code></pre>
  
  <p>Creating the type (T-SQL):</p>
  
  <pre><code>CREATE TYPE dbo.udtMassSpectra EXTERNAL NAME MassSpectra.udtMassSpectra;
  </code></pre>
  
  <p>throws an exception:</p>
  
  <blockquote>
    <p>Msg 10331, Level 16, State 1, Line 1 Type 'udtMassSpectra' in assembly
    'MassSpectra' derives from a generic type which is not supported for a
    CLR Type.</p>
  </blockquote>
  
  <p>What is the reason? Is there any workaround other than hiding the base class within a private member? This code works fine on a SQL-Server 2005.</p>