title: c# array outputs 0 when it isnt specified
body: <p>I am trying to output the odd and even numbers of an array, i have got it all working but for some reason when i create a foreach loop and output each number that is odd/even it starts with a zero? </p>
  
  <p>The way it is setup that the user inputs 10 numbers with a comma in between each letter (Starts as a string) and then it removes the comma and converts the numbers into an int and places it in an int array, to then be used in the other class. I input 1,2,3,4,5,6,7,8,9,1 to test it.</p>
  
  <pre><code>    Odds(ai.Odds);
      Evens(ai.Evens);
  
  
  
      Console.ReadKey();
  }
      public static void Odds(int[] odds)
      {
          Console.WriteLine("\nOdds:");
          foreach (var odd in odds)
          {
              Console.Write(odd + " ");   
          }
      }
  
  public static void Evens(int[] evens)
  {
      Console.WriteLine("\nEvens:");
      foreach (var even in evens)
      {
          Console.Write(even + " ");
      }
  }
  </code></pre>
  
  <p>and in the separate class doing the magic:</p>
  
  <pre><code>public int[] Odds
          {
              get
              {
                  int count = 0;
                  int[] odds = new int[NumArray.Length];
                  string[] oddNums = {"1", "3", "5", "7", "9"};
                  foreach (int num in NumArray)
                  {
                      foreach (string oddNum in oddNums)
                      {
                          if (num.ToString().EndsWith(oddNum))
                          {
                              odds[count++] = num;
                          }
                      }
                  }
                  Array.Sort(odds);
                  return RemoveDuplicates(odds);
              }
          }
  
          public int[] Evens
          {
              get
              {
                  int count = 0;
                  int[] evens = new int[NumArray.Length];
                  string[] evenNum = {"0", "2", "4", "6", "8"};
                  foreach (int num in NumArray)
                  {
                      foreach (string oddNum in evenNum)
                      {
                          if (num.ToString().EndsWith(oddNum))
                          {
                              evens[count++] = num;
                          }
                      }
                  }
                  Array.Sort(evens);
                  return RemoveDuplicates(evens);
              }
          }
  </code></pre>
  
  <p>Here is the RemoveDuplicates Method:</p>
  
  <pre><code>private int[] RemoveDuplicates(int[] numbers)
          {
              if (numbers.Length == 0)
              {
                  return numbers;
              }
              int[] uniques = new int[numbers.Length];
  
              int previousVal = numbers[0];
              uniques[0] = numbers[0];
              int count = 1;
              for (int i = 1; i &lt; numbers.Length; i++)
              {
                  if (numbers[i] == previousVal) continue;
                  previousVal = numbers[i];
                  uniques[count++] = numbers[i];
              }
              Array.Resize(ref uniques, count);
              return uniques;
          }
  </code></pre>
  
  <p>as an output i get(vvv), but i don't want the 0's at the beginning of them both, i don't want a 0 at all</p>
  
  <p><a href="https://i.stack.imgur.com/tPc3U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tPc3U.png" alt=""></a></p>