private bool PlayerTeamNameCheck(Team[] teams) { // Check for teams with same name if (teams.GroupBy(t => t.Name.ToLower()).Where(g => g.Count() > 1).Count() > 0) return false; // Check for player names List<string> players = new List<string>(); foreach (Team t in teams) players.AddRange(t.Players.Select(p => p.Name)); if (players.GroupBy(p => p.ToLower()).Where(g => g.Count() > 1).Count() > 0) return false; return true; }