展开全部
1、636f70793231313335323631343130323136353331333335313861int sum = 0;
for (int i = 1; i <= 100; i ++)
{
sum += i;
}
Console.Write(sum.ToString());
2、// 定义
enum Season
{
SPRING=0,
SUMMER=1,
AUTUMN=2,
WINTER=3
}
// 输出
Console.Write(Season.WINTER.ToString());
3、Func x = a => a * 5;
4、public class Person
{
private string name;
private int sno;
public string Name
{
get {return this.name;}
set {this.name = value;}
}
public int Sno
{
get {return this.sno;}
set
{
if (value > 0)
this.sno = value;
else
throw new Exception();
}
}
}