Prevent usage of default constructor

Posted by Farinha on Stack Overflow See other posts from Stack Overflow or by Farinha
Published on 2010-05-20T16:01:17Z Indexed on 2010/05/20 16:10 UTC
Read the original article Hit count: 153

Filed under:

Is there a way to prevent the usage of the default constructor?

All I can think of is throwing an exception, but I would like something that causes a compile time error.

© Stack Overflow or respective owner

Related posts about c#