C# 定义一个结构很累赘。
程序代码:
public struct myPoint { public int x, y; public myPoint(int x, int y) { this.x = x; this.y = y; } }int x, int y 出现两次。越看越别扭。
public struct myPoint { public int x, y; public myPoint(int x, int y) { this.x = x; this.y = y; } }int x, int y 出现两次。越看越别扭。