I have a string array with values ββin it (duh ...).
Is there an easy way to get the record that is most found? Sort of
values[37].getMostOften();
Greetings :)
You can use GroupBy :
GroupBy
var mostCommonValue = values.GroupBy(v => v) .OrderByDescending(g => g.Count()) .Select(g => g.Key) .FirstOrDefault();
Source: https://habr.com/ru/post/957546/More articles:How to copy the IDENTITY field? - amazon-redshiftHow to update a collection based on another collection in MongoDB? - mongodbWindows Azure Base Storage from SSIS SQL - imageC # dictionary for json - sorts automatically - jsonJavascript call inside ng-if - angularjsTHREE.JS: View geometry when inside a grid - geometryWhen does the __exit__ context manager appear, running inside the generator? - pythonCan I send a notification when the Unicorn wizard finishes restarting? - ruby ββ| fooobar.comModern OpenGL with GLFW3 on Mac OSX 10.8.4 - missing glGenVertexArrays () and glBindVertexArray ()? - xcodeACTION_INSTALL_PACKAGE - androidAll Articles