projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2004-06-09 Atsushi Enomoto <atsushi@ximian.com>
[mono.git]
/
mcs
/
tests
/
gen-6.cs
1
// Using an array of a type parameter.
2
3
class Stack<T>
4
{
5
int size;
6
T[] data;
7
8
public Stack ()
9
{
10
data = new T [200];
11
}
12
13
public void Push (T item)
14
{
15
data [size++] = item;
16
}
17
18
public T Pop ()
19
{
20
return data [--size];
21
}
22
23
public void Hello (T t)
24
{
25
System.Console.WriteLine ("Hello: {0}", t);
26
}
27
}
28
29
class Test
30
{
31
static void Main ()
32
{
33
}
34
}