takewhile c# example
IList<string> strList = new List<string>() {
"One",
"Two",
"Three",
"Four",
"Five",
"Six" };
var resultList = strList.TakeWhile((s, i) => s.Length > i);
foreach(string str in resultList)
Console.WriteLine(str);