I have an
and i'm trying to find the most frequent value inside the list, as well as the frequency of each of the numbers on the list, but how would it work in a way that I get something like an IList<double>
IDictionary<number, frequency>
of each value?
Thanks :)
var dictionary= list.GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count());
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.