using System;
namespace Test
{
public class Test<T>
{
private T _x;
private T _y;
public T X
{
get { return _x; }
set { _x = value; }
}
public T Y
{
get { return _y; }
set { _y = value; }
}
public void showValues()
{
Console.WriteLine("x = {0}", _x);
Console.WriteLine("y = {0}", _y);
}
public void ShowType()
{
Console.WriteLine("The class is of type {0}", typeof(T));
}
}
public class Program
{
static void Main()
{
Test<int> t = new Test<int>();
t.X = 40;
t.Y = 50;
t.ShowType();
t.showValues();
}
}
}