using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
public class MainClass{
public static void Main(string[] args){
String[] TestData = {"One", "Two", "Three", "Four",
"Five", "Six", "Seven", "Eight",
"Nine", "Ten"};
var ThisQuery =
TestData.SkipWhile(ThisElement => ThisElement != "Four").
TakeWhile(ThisElement => ThisElement != "Nine");
foreach (var ThisElement in ThisQuery)
Console.WriteLine(ThisElement);
}
}
|