For example I have the following code:
string Sheet[] = new string[]{
"ABCDEFG",
"1234567",
"abcdefg" };
while(true){
Console.SetCursorPosition(0, 0);
Console.WriteLine(string.Join(Environment.NewLine, Sheet)); }
However, I want to replace 'C' with '#'.
Because the cycle constantly reprints the text sheet, setting the cursor position and overwriting the 'C' doesn't solve my problem. I thought maybe if I used the
string.replace(Oldchar, NewChar)
function it may work. My question is: How can I select the specific string from the array and then the specific char?
EDIT: I may have asked the question a bit too vaguely. What if there are more 'C' characters in that string, but I want to repalce the 'C' in that specific position? It doesn't have to be it's first occurance.