R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `yield return` do in C#?

  • (A) Terminates method execution
  • (B) Pauses and resumes method execution
  • (C) Returns all values at once
  • (D) Throws an exception

Explanation by: Ram Sharma
`yield return` allows an iterator to pause and resume execution, returning one item at a time.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.