A whole lot less code and a lot easier to do.
public static string ToggleCase(this string str)
{
if (string.IsNullOrEmpty(str)) return str;
return string.Join("", (from i in str
select (char.IsLetter(i) ?
(char.IsUpper(i) ?
char.ToLower(i) :
char.ToUpper(i)) :
i).ToString()
).ToArray());
}
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.