how to search for a value in a list
pretty stupid question but ive tried looking online and i cant seem to find the answer, im fairly sure im using an older .net

p => p.Name == attackerName is a predicate - an anonymous function that takes in an instance of the type the list is generic over, and returns a bool. FirstOrDefault will return the first item that matches the predicate (it returns true), or default(T) if no items matchedteam_create classsnake_case as an officially accepted casingteam_create would become TeamCreatepublic string name; would become public string Name { get; set; }name with that


Team1.Any(x => x.Name == P1Check)