Gen.ExceptionTest C# (CSharp) Method

ExceptionTest() public static method

public static ExceptionTest ( bool throwException ) : void
throwException bool
return void
	public static void ExceptionTest(bool throwException)
	{
		InternalExceptionTest(throwException);
	}
	

Usage Example

Beispiel #1
0
    public static int Main()
    {
        Gen.ExceptionTest <Exception>(new Exception());
        Gen.ExceptionTest <Exception>(new InvalidOperationException());
        Gen.ExceptionTest <Exception>(new GenException <int>());
        Gen.ExceptionTest <Exception>(new GenException <string>());
        Gen.ExceptionTest <Exception>(new GenException <Guid>());
        Gen.ExceptionTest <Exception>(new GenException <ValX3 <ValX1 <int[][, , , ]>, ValX2 <object[, , , ][][], Guid[][][]>, ValX3 <double[, , , , , , , , , , ], Guid[][][][, , , , ][, , , , ][][][], string[][][][][][][][][][][]> > >());

        Gen.ExceptionTest <InvalidOperationException>(new InvalidOperationException());

        Gen.ExceptionTest <GenException <int> >(new GenException <int>());
        Gen.ExceptionTest <GenException <string> >(new GenException <string>());
        Gen.ExceptionTest <GenException <Guid> >(new GenException <Guid>());
        Gen.ExceptionTest <GenException <ValX3 <ValX1 <int[][, , , ]>, ValX2 <object[, , , ][][], Guid[][][]>, ValX3 <double[, , , , , , , , , , ], Guid[][][][, , , , ][, , , , ][][][], string[][][][][][][][][][][]> > > >(new GenException <ValX3 <ValX1 <int[][, , , ]>, ValX2 <object[, , , ][][], Guid[][][]>, ValX3 <double[, , , , , , , , , , ], Guid[][][][, , , , ][, , , , ][][][], string[][][][][][][][][][][]> > >());

        if (result)
        {
            Console.WriteLine("Test Passed");
            return(100);
        }
        else
        {
            Console.WriteLine("Test Failed");
            return(1);
        }
    }
All Usage Examples Of Gen::ExceptionTest