public static void RepeatedEvenTimes(int[] inputArray)
    {
      Dictionary<int, int> numbers = new Dictionary<int, int>();
      int length = inputArray.Length;
      int num = -1;
      for (int i = 0; i < length; i++)
      {
        if (numbers.Keys.Contains(inputArray[i]))
        {
          numbers[inputArray[i]] = numbers[inputArray[i]] + 1;
        }
        else
        {

          numbers.Add(inputArray[i], 1);
        }
      }

      Console.Write("input Array ");
      Console.WriteLine(string.Join(",", inputArray));

      foreach (var item in numbers)
      {
        if (item.Value % 2 == 0)
        {
          num = item.Key;
          Console.WriteLine("{0} Repeated {1} times ", item.Key, item.Value);
          break;
        }

      }

      if (num == -1)
      {
        Console.WriteLine("No number Repeated even number of times");
      }

      Console.WriteLine("-----------------------------------------------");
    }
 

input Array 3,3,3,5,5,5,2,2,2
No number Repeated even number of times
———————————————–
input Array 100,1,1,3,5,3,3
1 Repeated 2 times
———————————————–
input Array 2,2,2,2,2
No number Repeated even number of times
———————————————–