|
using System;
struct phonebook1
{
public string name;
public string phone;
public uint age;
struct address
{
public string city;
public string street;
public uint no;
}
}
class test
{
public static void Main()
{
phonebook1 p1;
p1.name = "小红";
p1.phone = "1234567";
p1.age = 26;
Console.WriteLine("姓名:{0},电话:{1},年龄:{2}!",p1.name,p1.phone,p1.age);
}
}
问:我怎样跟address里面的成员赋值?
谢谢了 |
|