2008-08-31 Zoltan Varga <vargaz@gmail.com>
[mcs.git] / tests / gtest-044.cs
blob679bbb1339bcc3228df120dc0467bae7fe93f223
1 // Operators and generic types.
3 using System;
5 class X<T>
7 public int Count;
9 public X (int count)
11 this.Count = count;
14 public static X<T> operator ++ (X<T> operand) {
15 return new X<T> (operand.Count + 1);
19 class Test
21 static void Main ()
23 X<long> x = new X<long> (5);
24 Console.WriteLine (x.Count);
25 x++;
26 Console.WriteLine (x.Count);