Throw Null reference Exception : Buildin Exceptions « Development Class « C# / C Sharp
- C# / C Sharp
- Development Class
- Buildin Exceptions
Throw Null reference Exception
using System;
using System.Collections;
class Class1 {
static void Main(string[] args) {
Exception objException = new Exception();
try {
objException = null;
Console.WriteLine(objException.Message);
} catch (Exception objE) {
Console.WriteLine(objE.ToString());
}
}
}
Related examples in the same category