title: Find least occurring members in the list in C#
body: <p>I have <code>list&lt;string&gt;</code> with random amount of entries (somewhere between 10-500).  and I need to find the value that occurs the least number of time. For example, <code>list&lt;string&gt; myList</code>has <code>100 "a", 50 "b", 2 "c", and 1 "d"</code>, and I wish to extract "c" and "d". My problem is that I will never know the exact number of each string, and exact name of the string in the list. </p>
  
  <p>For similar analogy, examine the code below:</p>
  
  <pre><code>public class Program
  {
      public static void Main(string[] args)
      {
          Random r = new Random();                
  
          int randomNumber = r.Next(5,15);
          int randomRangeOne = r.Next(0,2);
          int randomRangeTwo = r.Next(0,2);
  
          List&lt;int&gt; randomList = new List&lt;int&gt;();
  
          for(int i = 0; i &lt; 1000; i++)
          {
              int x = r.Next(randomNumber - randomRangeOne, randomNumber + randomRangeTwo);
              randomList.Add(x);
          }              
      }
  }
  </code></pre>
  
  <p>In this case (in the actual problem, it is random string, not random int), how would I extract least occurring values in the list?</p>