NonStaticConstructorRequired() static private method

ArgumentException with message like "The constructor should not be static"
static private NonStaticConstructorRequired ( string paramName ) : Exception
paramName string
return Exception
示例#1
0
 private static void ValidateConstructor(ConstructorInfo constructor, string paramName)
 {
     if (constructor.IsStatic)
     {
         throw Error.NonStaticConstructorRequired(paramName);
     }
 }
示例#2
0
 private static void ValidateConstructor(ConstructorInfo constructor)
 {
     if (constructor.IsStatic)
     {
         throw Error.NonStaticConstructorRequired();
     }
 }