|
by Dustin Campbell via Did it with .NET on 9/28/2007 5:47:20 PM
Recently,
I presented an example of how closures can cause headaches when used in the context
of LINQ expressions:
static class Program
{
static void Main()
{
var filter = String.Empty;
var query = from m in typeof(String).GetMethods()
orderby m.Name
where m.Name
!= filter
select m.Name;
foreach (var item in query)
{
Console.WriteLine(item);
filter = item;
... [ read more ]
|