text: Q:
  
  Remove duplicates from array and create a new array
  
  I want to remove all the duplicates in this array and I can't quite make it work. When all the duplicates are removed, I want to create a new array without the removed numbers. Here's my code:
    static void Main(string[] args)
      {
          int[] s = { 11, 11, 12, 12, 13, 13, 14, 15, 16 };
          int[] q = s.Distinct().ToArray();
  
          Console.WriteLine(q.ToString());
          Console.ReadLine();
      }
  
  This prints the array {11, 12, 13, 14, 15, 16}; but I wanted it to print the array {14, 15, 16}.
  
  A:
  
  Use:
  int[] s = { 11, 11, 12, 12, 13, 13, 14, 15, 16 };
  var NotDuplicateItems = s.GroupBy(r => r)
      .Where(grp => grp.Count() == 1)
      .Select(r => r.Key)
      .ToArray();
  
  The above will give you items which are not duplicate in the array s
  
  