我試圖通過現役球員的分類組...LINQ排序依據一些條件
在這種情況下,第一組包含了最大的內線球員:
List<Group> groups = tournament.Groups.OrderByDescending(o => o.Players.Count).ToList();
我要補充一個過濾器,將只計算活躍球員,像這樣的事情:
if (o.Players[index].Active == true)
count Players[index] into o.Players.Count
有人可以幫我的語法嗎?