Znajdź element na liście LINQ
string search = "lookforme";
List<string> myList = new List<string>();
string result = myList.Single(s => s == search);
PrashantUnity
string search = "lookforme";
List<string> myList = new List<string>();
string result = myList.Single(s => s == search);
var allowedStatus = new[]{ "A", "B", "C" };
var filteredOrders = orders.Order.Where(o => allowedStatus.Contains(o.StatusCode));
var filteredOrders = from order in orders.Order
where allowedStatus.Contains(order.StatusCode)
select order;