Given the following situation:
I do have a custom attribute that I can place on a class. (It means a Singleton, so any class using this attribute can be instantiated as a Singleton).
But of course, for a good Singleton, you may not create a new instance of the object by using the new() function in .NET
Is it therefore possible to throw a custom build error when a class that implements this attribute has a public constructor?