adspace


What is difference between yielding and sleeping?

Answer Posted / Rupendra Bahadur Singh

In C#, `yield` is a keyword used in generators to return a sequence of values one at a time, while `Thread.Sleep()` is a method that suspends the execution of the current thread for a specified amount of time.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an abstract class c#?

970


How do you inherit a class into other class in c#?

996


What is expression tree in c#?

999


Which namespaces are necessary to create a localized application?

1143


Why can't we use a static class instead of singleton?

956


How to assign Null value to Var?

1066