xxxxxxxxxx
MyClass result = list.Find(x => x.GetId() == "xy");
xxxxxxxxxx
var element = (from sublist in userList
from item in sublist
where item.uniqueidentifier == someid
select item).FirstOrDefault();
xxxxxxxxxx
List<int> numbers = new List<int>() { 2, 4, 6, 8, 10 };
int searchValue = 6;
bool isValueFound = numbers.Contains(searchValue);
if (isValueFound)
{
Console.WriteLine("Value found in the list.");
}
else
{
Console.WriteLine("Value not found in the list.");
}