What is the reason why this static analysis attribute is not allowed to be declared on constructors? I would like to annotate that a constructor throws an exception when a null argument is passed.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
internal sealed class ContractAnnotationAttribute : Attribute
{
//...
}
PS: I am asking in a hope that there is a some sort of general principle for this and not just their personal decision.