When is it important to have a public parameterless constructor in C#?

Posted by raven on Stack Overflow See other posts from Stack Overflow or by raven
Published on 2010-03-15T19:22:06Z Indexed on 2010/03/15 19:29 UTC
Read the original article Hit count: 122

Filed under:
|
|

I'm trying to understand the constraints on generic type parameters in C#. What is the purpose of the where T : new() constraint? Why would you need to insist that the type argument have a public parameterless constructor?

© Stack Overflow or respective owner

Related posts about c#

Related posts about generics