Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private string mostPopularTag()
- {
- List<string> listaTagova = new List<string>();
- for (int i = 0; i < Zivotinje.getInstance().getZivotinjskeVrste().Count; i++)
- {
- string[] tokens = Zivotinje.getInstance().getZivotinjskeVrste()[i].ZTag.Split(new string[] { ", " }, StringSplitOptions.None);
- listaTagova.AddRange(tokens);
- }
- var most = listaTagova.GroupBy(i => i).OrderByDescending(grp => grp.Count()).Select(grp => grp.Key).First();
- // MessageBox.Show(most.ToString());
- return most.ToString();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement