摘要: public struct Point { private int m_x, m_y; public Point(int x, int y) { m_x = x; m_y = y; } public override string ToString() { return string.Format("{0},{1}", m_x, m_y); } }上面是一个值类型的定义,下面创建一个实例,用在控制台上输出一些信息: Point p = new Point(1, 1); Console.WriteLine(p);这与 Point p = new Point(1, 1); Co 阅读全文
posted @ 2011-03-21 23:36 菩提树下的杨过 阅读(690) 评论(0) 推荐(1) 编辑