Ejemplo n.º 1
0
        /// <summary>
        /// returns all mentions
        /// from the mentions list
        /// as well as the number of times
        /// they appear in the list
        /// </summary>
        /// <returns>strout</returns>
        public string getAllMentions()
        {
            string strout = "";
            var    q      = Mentions.GroupBy(x => x)
                            .Select(g => new { Value = g.Key, Count = g.Count() })
                            .OrderByDescending(x => x.Count);

            foreach (var m in q)
            {
                strout = strout + ("Mentions: " + m.Value + " Times mentioned: " + m.Count + "\n");
            }
            return(strout);
        }