diff options
Diffstat (limited to 'csharp.html.markdown')
-rw-r--r-- | csharp.html.markdown | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/csharp.html.markdown b/csharp.html.markdown index 81b50e08..a689fe97 100644 --- a/csharp.html.markdown +++ b/csharp.html.markdown @@ -435,7 +435,7 @@ on a new line! ""Wow!"", the masses cried"; Func<int, int> square = (x) => x * x; // Last T item is the return value Console.WriteLine(square(3)); // 9 - // DISPOSABLE RESSOURCES MANAGEMENT - let you handle unmanaged resources easily. + // DISPOSABLE RESOURCES MANAGEMENT - let you handle unmanaged resources easily. // Most of objects that access unmanaged resources (file handle, device contexts, etc.) // implement the IDisposable interface. The using statement takes care of // cleaning those IDisposable objects for you. @@ -511,11 +511,11 @@ on a new line! ""Wow!"", the masses cried"; var db = new BikeRespository(); // execution is delayed, which is great when querying a database - var fitler = db.Bikes.Where(b => b.HasTassles); // no query run + var filter = db.Bikes.Where(b => b.HasTassles); // no query run if (42 > 6) // You can keep adding filters, even conditionally - great for "advanced search" functionality - fitler = fitler.Where(b => b.IsBroken); // no query run + filter = filter.Where(b => b.IsBroken); // no query run - var query = fitler + var query = filter .OrderBy(b => b.Wheels) .ThenBy(b => b.Name) .Select(b => b.Name); // still no query run |