public Race GetRace(string raceName) { foreach (var race in Races) { if (string.Compare(raceName, race.RaceName, StringComparison.CurrentCulture) == 0) { return race; } } throw new Exception("Race not found: " + raceName); }