コード例 #1
0
        public static Player[] SortPlayers(Player[] players, PlayerComparer.SortBy sortBy, bool reverse)
        {
            var comparer = new PlayerComparer(sortBy, reverse);

            Array.Sort(players, comparer);
            return(players);
        }
コード例 #2
0
        public static Player[] SortPlayersDeaths(Player[] players, bool reverse)
        {
            var comparer = new PlayerComparer(PlayerComparer.SortBy.Deaths, reverse);

            Array.Sort(players, comparer);
            return(players);
        }