> I noticed that Linq-SQL DataContext ExecuteQuery method does not have new()
> constraint:
[quoted text clipped - 5 lines]
> Any idea why and how ExecuteQuery<T> can be implemented witout new()
> constraint ?
Given that there's quite a bit of reflection involved (well, at least
initially - it's all compiled into lightweight functions, I believe)
one more bit to create instances isn't that much of a worry.
The new() constraint just lets the compiler use
Activator.CreateInstance, knowing that there'll be a parameterless
constructor avaialable (for classes - it uses initobj for value types).

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk