C Sharp7
1,Out变量
eg: public Class1(int m, out int n)
eg:public Class2(int a) : base(a, out int n)//继承父类传值
{
Console.WriteLine("test is " + n);
}
2,元组
eg:var Student=(Name:"xiaoming",age:1);//元组定义
eg:var (string Name,int Age) Student=("xiaoming",1);//元组定义
eg:public void Give(string name, int age) => (Name, Age) = (name, age);//元组赋值
eg:public void Set(out string name,out int age) => (name, age) = (Name, Age);//元组输出
3,弃元
eg:public (int a,int b,int c,string d) test();
var (_, _, _,prop1) = test2.test();//多余的返回值不用获取
4,默认值
eg:int a=dafault;
string b=default;
5,枚举
枚举参考链接 https://www.cnblogs.com/kissdodog/archive/2013/01/16/2863515.html