I want to create a function that will replace every dot with a comma in a provided string.
My code looks like this:
public void replaceDot(ref string str) {
for(int i = 0; i < str.Length; i++) {
if (str[i] == '.') {
str[i] = ','; //readonly error here
}
}
}
Any ideas how to make it work? I also tried using foreach loop but it also didn't work.