结构体

it2025-01-22  19

十六、结构体

(一)格式

struct student { public int num; public string name; public string sex; public one A; } struct one { public string a; public int b; public int[] array; } static void Main(string[] args) { //初始化 student stu = new student(); stu.num = 1; stu.name = "张三"; stu.name = ""; student stud = new student(); stu.num = 1; stu.name = "李四"; stu.name = ""; student stude = new student(); stu.A.a = "132"; stu.A.b = 132; stu.A.array = new int[5]; }

 

转载于:https://www.cnblogs.com/bosamvs/p/5490752.html

相关资源:数据结构—成绩单生成器
最新回复(0)