C#.net 提供的4个关键字,in,out,ref,paras开发中会经常用到,那么它们如何使用呢? 又有什么区别? 1 in in只用在委托和接口中: 例子: 1 2 3 4 5 6 7 8 9 10 11 12 //测试模型 class Model { public int a { get; set; } public Model(int a) {
输入班级人数,统计人名,性别,年龄: 建立一维数组,并放到集合中: //Console.Write("请输入班级人数:"); //int a = int.Parse(Console.ReadLine()); //ArrayList al = new ArrayList(); //for (int i = 0; i < a;i++ ) //{ // string[] name = new string[3]; // Console.Write("请输入第{}个人的姓名:&