public static void Main()
Console.WriteLine("Hello World, Let's start testing!");
decimal d = (decimal)number;
IDisposable myObj = new MyDisposable();
AssertNull(myObj as NotMyDisposable);
AssertThrows(() => { var dis = (NotMyDisposable)myObj; });
Console.WriteLine("End");
private static void AssertNull(object o)
Console.WriteLine("FAIL: Not Null: " + o.GetType());
private static void AssertNotNull(object o)
Console.WriteLine("FAIL: Null");
private static void AssertThrows(Action action)
Console.WriteLine("FAIL: DID NOT THROW!");
public class MyDisposable : IDisposable
public class NotMyDisposable : IDisposable