What you describe is not exactly "one by one".
I'm
almost sure ([EDIT] quite sure after the OP's comment in reply to my comment to the question[END EDIT]) this requirement makes no sense, but you should call one method, then set a timer for the delay you need, and in the timer event handler, call the second method. Note that this method will be called asynchronously to you UI, so you have to be prepared to deal with that.
The choice of the timer depends on several factors, including the UI you are using. For example, for
System.Windows.Forms
, you can use
System.Windows.Forms.Timer
, but this timer has extremely bad accuracy, but I can imagine that, with 10 sec, you would not care much. Then, you can do whatever you want in the timer even handler. With some other timers, you cannot directly call any UI methods/properties, because the timer event can be called in some other thread. Besides, you can use a thread instead of the timer.
You cannot call anything related to UI from non-UI thread. Instead, you need to use the method
Invoke
or
BeginInvoke
of
System.Windows.Threading.Dispatcher
(for both Forms or WPF) or
System.Windows.Forms.Control
(Forms only).
You will find detailed explanation of how it works and code samples in my past answers:
Control.Invoke() vs. Control.BeginInvoke()[
^],
Problem with Treeview Scanner And MD5[
^].
See also more references on threading:
How to get a keydown event to operate on a different thread in vb.net[
^],
Control events not firing after enable disable + multithreading[
^].
With WPF, you can use
System.Windows.Threading.DispatcherTimer
which also runs on a separate thread, so you would need to use the mechanism described above:
http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer%28v=vs.110%29.aspx[
^].
—SA