数组段
2014-07-22 21:14
162 查看
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int[] arri = new int[] { 1, 2, 3, 4, 5 }; ArraySegment<int> ass = new ArraySegment<int>(arri, 1, 3);//索引从第1个到第三个 foreach (int item in ass) { Console.WriteLine(item);//输入2,3,4 } Console.ReadKey(); } } }
相关文章推荐
- 函数指针数组的妙用
- javascript splice数组简单操作
- 队列_数组实现 [循环队列]
- 数组 变长数组
- C++字符指针及字符数组
- AS3.0数组的方法大全(精选)
- 关于字符串、数组和参数传递的一道题
- JAVA SE回顾及思考(2)——数组的复制与动态扩展
- HDOJ-1556(线段树||树状数组,区间更新+点查询)
- 【PHP】php 二维关联数组的对某一个值排序
- pHp学习--数组遍历
- iOS开发——MJExtension复杂数组用法
- Java当中数组和容器之间的相互转换
- nginx源码分析—数组结构ngx_array_t
- hdu 1541 Stars(树状数组)
- 第八周项目1.1-数组作数据成员
- 数组中只出现一次的数字
- Java实现字节数组中截取指定长度数组元素
- string 类型 数组
- 逆向基础10:数组