摘要:
我们首先来看下面的一段代码: class Program { static void Main(string[] args) { Point p; Console.WriteLine(p); Point p1 = new Point(); Console.WriteLine(p1); Console 阅读全文
posted @ 2022-04-03 21:31
C#工控菜鸟
阅读(96)
评论(0)
推荐(0)
摘要:
一,C#中结构 在C#中可以使用struct关键字来定义一个结构,级别与类是一致的,写在命名空间下面。 1)结构中可以定义属性,字段,方法和构造函数。示例代码如下: //定义结构 struct Point { //定义字段 private int x; //封装字段 public int X { g 阅读全文
posted @ 2022-04-03 21:10
C#工控菜鸟
阅读(250)
评论(0)
推荐(0)

浙公网安备 33010602011771号