I know this question had been answered a thousand times, but i still can't get the functions to work at the same time. Here is my code:
static void Main(string[] args)
{
a();
a();
}
static void a()
{
string sampleString = "a";
Console.WriteLine(sampleString);
for (int i = 0; i < 10; i++)
{
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(0.1));
Console.SetCursorPosition(0, Console.CursorTop -1);
sampleString = " " + sampleString;
Console.WriteLine(sampleString);
}
}
The function just writes the letter 'a' and after 0.1 seconds adds a space behind it, not complicated. After the function ends, it does the same thing again. I want both of the functions to work at the same time, the first function in the first line and the second in the second line. Thanks in advance.