logo
  • 教程列表
  • SO官方文档
  • Linq 使用 Take while while Skip While
    • 采取方法
    • 跳过方法
    • TakeWhile()
    • SkipWhile()
  1. StackOverflow 文档
  2. linq 教程
  3. Linq 使用 Take while while Skip While
  4. 跳过方法

跳过方法

Created: November-22, 2018

从序列中的第一个元素开始跳过元素到指定位置。

签名:

Public static IEnumerable Skip(this IEnumerable source,int count);

例

int[] numbers = { 1, 5, 8, 4, 9, 3, 6, 7, 2, 0 };
var SkipFirstFiveElement = numbers.Take(5);

输出: 结果为 3,6,7,2 和 0 获取元素。

  • TakeWhile()
  • 采取方法

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明