projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2007-10-17 Jonathan Pobst <monkey@jpobst.com>
[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
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
}