// Operators and generic types. using System; class X { public int Count; public X (int count) { this.Count = count; } public static X operator ++ (X operand) { return new X (operand.Count + 1); } } class Test { public static void Main () { X x = new X (5); Console.WriteLine (x.Count); x++; Console.WriteLine (x.Count); } }