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

  • 關於本站
  • 免責聲明