The following code implements an UDT which derives from a generic (SortedDictionary):

[Serializable]
[Microsoft.SqlServer.Server.SqlUserDefinedType(Format.UserDefined, MaxByteSize = 8000)]
public class udtMassSpectra : SortedDictionary<float, float>, INullable, IBinarySerialize, ICloneable, IDisposable
{
...
}

Creating the type (T-SQL):

CREATE TYPE dbo.udtMassSpectra EXTERNAL NAME MassSpectra.udtMassSpectra;

throws an exception:

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.

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.

Edit
Report