The best way to explain the difference between
SelectMany in Linq is to show an example. In this example we will return a list of courses, each containing a list of students. You will see that
Select will return a list of lists of students while
SelectMany will flatten the lists into a single list of students.
One way to slow down a loop in .NET is to use the
System.Threading.Thread.Sleep() method. This will suspend the current thread for a specified amount of time. Note that this is not the same as a timer which fires on the specified interval. The Thread.Sleep method simply pauses that thread for a given amount of time before continuing.
It’s as simple as adding
//Pause current thread for one second before continuing System.Threading.Thread.Sleep(1000);
to the loop you would like to slow down.