Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-044.cs
1 // Operators and generic types.
2
3 using System;
4
5 class X<T>
6 {
7         public int Count;
8
9         public X (int count)
10         {
11                 this.Count = count;
12         }
13
14         public static X<T> operator ++ (X<T> operand) {
15                 return new X<T> (operand.Count + 1);
16         }
17 }
18
19 class Test
20 {
21         public static void Main ()
22         {
23                 X<long> x = new X<long> (5);
24                 Console.WriteLine (x.Count);
25                 x++;
26                 Console.WriteLine (x.Count);
27         }
28 }