+ 3
[C# - Console] Is there any way to print chars, words or even lines one by one (by delay) in Console?
For example i want to print "Loading....." But i want those dots to appear one by one to show loading is in progress. Is it possible?
3 ответов
+ 4
You can use Thread.Sleep(), which will delay for a certain number of milliseconds. Together with Console.Write(), you can make it display “Loading”, then wait a second before displaying the periods/dots.
For Thread.Sleep(): https://docs.microsoft.com/en-us/dotnet/api/system.threading.thread.sleep?view=netcore-3.1
Please note: it won’t run on the SoloLearn compiler, due to it not being executed on your machine.
+ 2
Rowsej Thanks bro 🙏🏻 It worked 👌🏻 MS documents were so helpful.
+ 2
No worries!