public struct Customer
{
public string name;
public int age;
public char sex ;
}
static void Main(string[] args)
{
Customer ct=new Customer();
List<Customer> clist=new List<Customer>();
ct.name = "鄉民";
ct.age = 20;
ct.sex = 'M';
clist.Add(ct);
Console.WriteLine("Name:{0},\tAge:{1},\tSex:{2}", clist[0].name,
clist[0].age, clist[0].sex);
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.22.18.86