public static void Main()
string str = "fGm&pHel2T";
string expected = "fgm&phel2t";
string result = ToLowerCase(str);
Console.WriteLine("Expected: {0}", expected);
Console.WriteLine("Result: {0}", result);
public static string ToLowerCase(string str) {
char[] chars = str.ToCharArray();
for (int i = 0; i < chars.Length; i++)
if ('A' <= chars[i] && chars[i] <= 'Z') {
chars[i] = (char)(n + 32);
return new string(chars);