I'm trying to simulate a loading screen that goes from 0% to 100%.
I'm using Console.Write instead of WriteLine but this only prints the value alongside the rest instead of replacing the last print.
for (int k = 0; k <=100; k++){
Console.Write($"[LOADING: {k}% ]");
Thread.Sleep(25);
}
This results in:
[LOADING 1%] [LOADING 2%] [LOADING 3%] [LOADING 4%] [LOADING 5%]
I expect a single string that replaces itself with the next printed value