news

Closures

Posted on July 10, 2009. Filed under: news |

Once you use them, it’s hard to go back. The Java Jakarta Collections didn’t have true closures, but they were close enough and very useful. Here’s a C# example using anonymous delegates:

rules.ForEach(delegate(PriceRule rule)
{
ruleCatalog[rule.Item] = rule;
});

For loops are bronze age.

Read Full Post | Make a Comment ( 2 so far )

  • Category Cloud

  • Twitter

  • Del.icio.us Links

Liked it here?
Why not try sites on the blogroll...