All pastes #251803 Raw Edit

Kiryn

public text v1 · immutable
#251803 ·published 2006-11-18 17:50 UTC
rendered paste body
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();
		}
	}
}