数组。。
2016-04-21 18:49
295 查看
1,可定义结构体类型的数组。如上回讲到的Goods [] array=new Goods[10];要灵活运用.2,Array是所有数组的鼻祖。3,测试长度array.GetLength(0);的用法,其中0是维度 返回值是整型;而array.Length 直接得到长度, 4,定义数组并初始化 int[] a = new int[2]; int j=a.GetLength(0); Console.WriteLine(j); int[] b = new int[2] { 1, 2 }; int[] c = new int[] { 1, 2, 3 }; int[] d = { 1, 2, 3 };5,Console和Main不能定义数组6,待更新。。
相关文章推荐
- enum 枚举 重要程度高于 结构体---初学者的记录
- C#中的结构体----面向对象的编程很少用
- Xcode升级插件兼容一键解决命令工程
- 有关“类”的经典错误
- 惠普HPwin系统装虚拟机无64bits
- Json
- 杭电2024题
- MyBatis springboot gradle 开发配置
- 杭电2040 亲和数
- 杭电 2021题 发工资咯:)
- 杭电2018 母牛故事
- 杭电2036题
- 杭电2031题
- 杭电2027题
- Activity通信之返回数据
- 2013 - Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
- strcmp()
- mvn常用命令
- iOS load和initialize方法加载顺序测试结果
- 《Maven权威指南》学习笔记二十一_构建生命周期