(not allowed to use LINQ or other libraries) I've created a While loop to convert each char into it opposite form of Uppercase or Lowercase and at the end of the loop I'm getting a 'System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'' and I've no idea how to resolve the error. The loop carries out as expected but faces this error when the last char in the array has been converted and retests the parameters of the 1st embedded while loop. Also if there's an easier way to do this I'm all ears. Thanks in advance

```cs
string text2 = "HELLO my friEND";

char[] convert = text2.ToCharArray();
int b = 0;
int a = convert.Length;
while (b <= a)
{
    while (char.IsUpper(convert[b]))
    {
        char.ToLower(convert[b]);
        b++;
    }
    while (char.IsLower(convert[b]))
    {
        char.ToLower(convert[b]);
        b++;
    }
    while (char.IsWhiteSpace(convert[b]))
    {
        b++;
    }
}

string hello = new string(convert);

Console.Write(hello);
Console.WriteLine();
Console.Write("test");
return 0; 

```