Code:
private static Dictionary<byte, string> SelectTopFive()
{
Dictionary<byte, string> Select = new Dictionary<byte, string>();
int count = (Damage.Count > 0) ? (Damage.Count > 5) ? 5 : Damage.Count : 0;
if (count > 0)
{
for (int i = 0; i < count; i++)
{
KeyValuePair<uint, GuildWarsGuild> sel =
Damage.Aggregate((l, r) => l.Value.Score > r.Value.Score ? l : r);
Select.Add((byte)i, sel.Value.Guild.Name + ": " + sel.Value.Score);
}
}
return Select;
}
Code:
//guildid, gwguild public static Dictionary<uint, GuildWarsGuild> Damage = new Dictionary<uint, GuildWarsGuild>();
It does work, but my question is would there be any better ways to get the top five?
Thanks.






