Skip to content

Instantly share code, notes, and snippets.

@masaru-b-cl
Created April 27, 2012 05:17
Show Gist options
  • Save masaru-b-cl/2506085 to your computer and use it in GitHub Desktop.
Save masaru-b-cl/2506085 to your computer and use it in GitHub Desktop.
Index付Whereで対象を除く
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var source = Enumerable.Range(0, 10);
foreach (var item in source.Where((x,i) => i != 2))
{
Console.WriteLine(item);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment