日期:2014-05-17 浏览次数:20761 次
struct A
{
public B b;
}
struct B
{
public int i;
}
struct student
{
public int id { get; set; }
public person p { get; set; }
}
struct person
{
public string name { get; set; }
public int age { get; set; }
}
static void Main(string[] args)
{
student s = new student();
var p = new person();
p.name = "asd";
s.p = p;
Console.WriteLine(s.p.name);
Console.ReadLine();
}