- 数组()
#region 数组 //初始化方式_0:先声明再赋值 string[] weekDays_0 = new string[7]; weekDays_0[0] = "Sun"; weekDays_0[1] = "Mon"; weekDays_0[2] = "Tue"; weekDays_0[3] = "Wed";//... //初始化方式_1:声明数组时即将其初始化... string[] weekDays_1 = new string[] { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; //初始化方式_1.5:声明数组时即将其初始化...快捷方式... string[] weekDays_2 = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; //修改 weekDays_0[0] = "Mon"; #endregion
学习泛型的时候翻过来再学习下基础知识...记录一下...