I've already asked this same question once, but in that case I needed it for the python language, now I need to solve this same problem with the C # language
I have a loop in C # , and I would like to enter the value of a variable each time it is updated, but I do not want to dirty the console giving print every time and nor clean the entire console .
Is there a way for me to get this result?
int a = 0;
Console.WriteLine("Executando processo:");
while (True) {
a = a +1
Console.WriteLine(a);
}
The result at the end of 3 interactions is:
Interaction 1:
$ - Executando processo:
$ - 1
Interaction 2:
$ - Executando processo:
$ - 1
$ - 2
Interaction 3:
$ - Executando processo:
$ - 1
$ - 2
$ - 3
And I would like to get the following result:
Interaction 1:
$ - Executando processo:
$ - 1
Interaction 2:
$ - Executando processo:
$ - 2
Interaction 3:
$ - Executando processo:
$ - 3