Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

35 lines
361 B
C#

// Using an array of a type parameter.
class Stack<T>
{
int size;
T[] data;
public Stack ()
{
data = new T [200];
}
public void Push (T item)
{
data [size++] = item;
}
public T Pop ()
{
return data [--size];
}
public void Hello (T t)
{
System.Console.WriteLine ("Hello: {0}", t);
}
}
class Test
{
public static void Main ()
{
}
}