title: cannot return maximum element
body: <p>I am trying to return maximum element from array using recursion<br>
  here is my code</p>
  
  <pre><code>    static void Main(string[] args)
      {
          int[] Array=new int[]{10,233,34};
  
          int _MaxVal = CalculateMax(Array, 0, 0);
          Console.WriteLine(_MaxVal);
          Console.ReadKey();
  
      }
  
      private static int CalculateMax(int[] Array, int Startpos, int maxval)
      {
          if (Startpos != Array.Length)
          {
              if (Array[Startpos] &gt; maxval)
              {
                  maxval = Array[Startpos];
              }
  
  
              CalculateMax(Array, ++Startpos, maxval);
          }
  
          return maxval;
      }
  </code></pre>
  
  <p>I am getting MaxVal as 10 .</p>
  
  <p>What is wrong with it ??</p>
  
  <p>Thanks all</p>