Code struct Point<T> { public T X; public T Y; } Point<int> a = new Point<int>(); a.X = 1; a.Y = 2; Console.WriteLine("{0},{1}", a.X, a.Y); 转载于:https://www.cnblogs.com/duwamish/archive/2009/04/24/1443139.html