Mystery of  Yield keyword Code icon

Mystery of Yield keyword Code

★★★★★
★★★★★
(0.00/5)

1.09Free7 years ago

Download Mystery of Yield keyword Code APK latest version Free for Android

Version 1.09
Update
Size 25.58 MB (26,818,011 bytes)
Developer Learn and Master Now
Category Apps, Education
Package Name com.leman.yieldstatement
OS 2.3 and up

Mystery of Yield keyword Code APPLICATION description

Use the app to have an deep understanding of yield keyword. Don't let it bug you.!

The yield keyword is used with methods that return IEnumerable or IEnumerator and it makes the compiler generate a class that implements the necessary plumbing for using the iterator.


The yield keyword effectively creates a lazy enumeration over collection items that can be much more efficient. For example, if your for each loop iterates over just the first 5 items of 1 million items then that's all yield returns, and you didn't build up a collection of 1 million items internally first. Likewise you will want to use yield with IEnumerable return values in your own programming scenarios to achieve the same efficiency.

It is often more convenient to use the yield statement. The yield statement is a special kind of return, that ensures that the function will continue from the line after the yield statement next time it is called.


The easiest way understand code like this is to use the app and see what happens.

↓ Read more
Mystery of  Yield keyword Code screen 1 Mystery of  Yield keyword Code screen 2