Vote UpVote

Lambdas and expression trees in Delphi

Delphi sorcery – Ever wanted to write something like this in Delphi?for cust in customers.Where(c => c.CustomerId = 'ALFKI') do ...Actually in Delphi you have to write it like this.for cust in customers.Where( function(c: TCustomer): Boolean begin Result := c.CustomerId = 'ALFKI'; end) do ... Ugh, lots of code just to declare the anonymous method. Well, we are used to writing more letters in Delphi so that is not really the problem. Another thing is more interesting: expression trees. What can you do with it? Lots of cool stuff. The most interesting for me at least was the ability to create SQL ...
Favorite? Off-Topic? noreply@blogger.com @ 2011-05-09 20:39


Visits: 27
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


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