NonStaticConstructorRequired() static private méthode

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