foreach(string item in collection) { }
// get the first item if there is one string x = collection.FirstOrDefault(); // or get the first one that confirms to a condition, such as it // starts with "A" string y = collection.FirstOrDefault(s => s.StartsWith("A"));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)