當前位置:編程學習大全網 - 網站源碼 - 按源代碼排序

按源代碼排序

int[]array = new int[]{ 0,2,3,4,8,6,4,1,2,8,5,4,2,4,1 };

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]。關鍵;

簡短寫完後,需要考慮幾個元素出現次數相同的情況=。=

  • 上一篇:頂級交易員最新txt全集
  • 下一篇:modern ui for wpf怎麽實現主體更換的
  • copyright 2024編程學習大全網