Hi, I am expecting the string which has "i" but getting empty results. Can you tell me the reason?
PetOwner[] petOwners = { new PetOwner { Name = "sen", Pets = new List { "puppy", "tiger" } },
new PetOwner { Name = "sugu", Pets = new List { "jimmy", "rose" }}
};
var pets = petOwners.SelectMany(p => p.Pets);
var pets1 = pets.TakeWhile<string>(s => { Console.WriteLine(s); return s.Contains("i"); });