var groupList = array。ToList()。group by(a = & gt;a)。選擇(g = & gtnew { g.Key,count = g.Count() })。order by descending(c = & gt;c .計數);
int maxNum = groupList。ToList()[0]。關鍵;
簡短寫完後,需要考慮幾個元素出現次數相同的情況=。=