特定のプレーヤーのポイントとその横にある彼の名前を保持している SortedDictionary があります。私がする必要があるのは、これを降順で並べ替えて、辞書の最初の位置に勝者が来るようにすることです。どうやってやるの?
また、キーを知らずにリストからアイテムを取得するにはどうすればよいですか?
SortedDictionary<int, string> dict = new SortedDictionary<int, string>();
dict.Add(player1Pts, playerNames[0]);
dict.Add(player2Pts, playerNames[1]);
dict.Add(player3Pts, playerNames[2]);
助けてくれてありがとう!