using System; using System.ComponentModel; static class NullUtil { public static bool IsNull(this object x) { return x == null; } } class MainClass { static void Main() { object y = null; Console.WriteLine(y.IsNull()); y = new object(); Console.WriteLine(y.IsNull()); } }