正在加载图片...
struct Point Point pt1 new Point(10,6); Point pt2 new Point(5,8); public int x,y; Point pt3 pt1 pt2; public Point(int x,int y) Point pt4 pt1-pt2; Console.WriteLine("pt1+pt2 x=(0),y=(1)",pt3.x,pt3.y); this.x =x; Console.WriteLine("pt1-pt2 x=[0).y=(1)",pt4.x,pt4.y); this.y=y; Console.ReadLine(); } public static Point operator +(Point p1,Point p2) return new Point(p1.x p2.x,p1.y p2.y); public static Point operator-(Point p1,Point p2) { return new Point(p1.x-p2.x,p1.y-p2.y); 1515
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有