System.IndexOutOfRangeException : Index was outside the bounds of the array
<p>I have the following array :-</p>

<pre><code>public string reArrange(string s)
        {
            char[] array = s.ToCharArray();
            int length = array.Length;
            char[] arranged = new char[length];
             for (int i = 0; i &lt; length; i++)
            {
                int newposition = length - i;
               arranged[newposition] = array[i];
            }
            return new string(arranged);
        }
</code></pre>

<p>but the above method will raise the following error:-</p>

<p>System.IndexOutOfRangeException : Index was outside the bounds of the array..
so what might be wrong?
BR</p>
