2
votes
Vote UpVote

.NET/C#: some starting posts on the `yield` keyword.

The Wiert Corner – Peter Leslie Morris asked if Delphi already incorporates the `yield` keyword that C# had introduced in C# 2. It doesn’t Delphi doesn’t, but for the people interested what it does in C#: Basically `yield` is syntactic sugar to make it a lot easier to write methods that return enumerators of some sort. It delays (hence the yield keyword) execution until the enumerator as actually being used. It is one of the hardest C# things to master (it is the most complicated transformation in the compiler, followed by anonymous methods), but it can be very useful. VB.NET doesn’t have it ...
Favorite? Off-Topic? jpluimers @ 2013-08-08 07:00

Statistics

Visits: 722
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Neonimous
stukelly
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)