I'm writing a really simple IoC/DI container, and I've got the following code:
ConstructorInfo[] ctors = concreteType.GetConstructors();
if (ctors.Length == 0)
return Activator.CreateInstance(concreteType);
// more code goes here...
I can't come up with a test case that results in a type having zero constructors, even with this:
class LonelyType {}
Is it possible for a .NET type to have no constructors, or does the CLR always provide an implicit one?