Monday, October 22, 2012

Closure in C#

http://diditwith.net/PermaLink,guid,235646ae-3476-4893-899d-105e4d48c25b.aspx

static List<string> GetNamesStartingWith(string startingText)
{
  return g_Names.FindAll(
    delegate(string name)
    {
      return name.StartsWith(startingText);
    });
}

No comments:

Post a Comment