Post date: May 24, 2014 1:15:38 AM
And here's the code for this wackiness. Download SQLList.cs and enjoy. Consider carefully if you plan on actually using it, though. Using CLR datatypes in table data mainly serves to make the DB hard to manage, and even when using the data type in a script, keep in mind that the object must be deserialized every time it is read. This means, for example, if you use the SQL list in the WHERE clause of a query, and 1 million rows must be checked, then the deserialization process will be executed 1 million times. There will be a few, not many, situations when something like this will be worth using.
But it was genuinely fun to write.
You can either install a CLR user-defined type through visual studio using a method such as this or you can do it manually like here.