namespace 结构体_枚举类型
{
class Program
{
struct jiegouti
{
public int fenshu;
public string name;
public string kecheng;
}
static void Main(string[] args)
{
jiegouti a = new jiegouti();
jiegouti b = new jiegouti();
a.fenshu = 95;
a.name = "约里克";
a.kecheng = "英雄联盟";
Console.WriteLine("姓名:" + a.name + "\n课程:" + a.kecheng + "\n分数:" + a.fenshu);
b.fenshu = 100;
b.name = "卡尔萨斯";
b.kecheng = "LOL";
Console.WriteLine("姓名:" + b.name + "\n课程:" + b.kecheng + "\n分数:" + b.fenshu);
Console.ReadLine();
ArrayList al = new ArrayList();
}
}
}
原文:http://www.cnblogs.com/lk-kk/p/4404189.html