using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication3 { class Program { public struct student { public string name; public int ID; public struct address { public string school; public string name; } } static void Main(string[] args) { student s1; Console.WriteLine(); } } } 如上,要是想访问student里的address的school应该如何访问?
3 回答
慕沐林林
TA贡献2016条经验 获得超9个赞
public struct student { public string name; public int ID; public struct address { public string school; public string name; } } 有问题 改成 public struct student { public string name; public int ID; public address add; //这里少了句 public struct address { public string school; public string name; } }
- 3 回答
- 0 关注
- 608 浏览
添加回答
举报
0/150
提交
取消