System.Reflection.RuntimeConstructorInfo.ThrowNoInvokeException C# (CSharp) Method

ThrowNoInvokeException() private method

private ThrowNoInvokeException ( ) : void
return void
        internal void ThrowNoInvokeException()
        {
            CheckCanCreateInstance(DeclaringType, (CallingConvention & CallingConventions.VarArgs) == CallingConventions.VarArgs);

            // ctor is .cctor
            if ((Attributes & MethodAttributes.Static) == MethodAttributes.Static)
                throw new MemberAccessException(Environment.GetResourceString("Acc_NotClassInit"));
            
            throw new TargetException();
        }