Hello all, i am working on little exercise in my book and it ask for me to make a cartoon speech simulator.... well lets say that the program needs to replace all the r for a w.
I didn't have any problem with it but, (there is always a but) if i type R instead of r, it wont replace it (normal... not the same case) so what i did is that i add a second line to go thru my string again and replace the R with a W:
Code:
string sentence
Console.Write("Type a sentence");
sentence = Console.ReadLine();
Console.WriteLine(""); //This is only to add a blank line
sentence.Replace("R", "W");
Console.WriteLine( sentence.Replace("r", "w"));
Console.Write("Press enter to quit");
Console.ReadLine();
Is there another way to work around the case without changing it ?
Thanx