hello i am searching for a good approach to change a single char in a string to the previous char of it . i mean if i have this string = "abcd" i want to change the 'd' char to 'c' ? how to change the char to to the one before it (alphabetically) ?
i want to use the approach here:
int StringSize=0;
string s=" ";
s = Console.ReadLine();
StringSize = s.Length;
s.Replace(s[StringSize-1],the previous char);
i want to change the char s [StringSize-1] to the previous char of it.
I've tried to do this depending on the ASCII code of the character but i did't find a method to convert form char to ASCII.