Ahmed El-Halwagy’s Blog

Archive for the ‘LINQ’ Category

Anonymous Methods and Lambdas.

Posted by: Ahmed on: January 10, 2009

A while ago, when I posted my last post on this blog which was titles (Delegates and Events – A Look Back), I stated that it was an introduction to Lambda Expressions. Though it took me more than a month to re-blog again, here i’m continuing the journey on the C# 3.0 language enhancements features. [...]

string name = “Ahmed Halwagy”; if (name.IsHalwagy()) Console.WriteLine(“Yeap”); else Console.WriteLine(“Not halwagy”); Shocked? .. Cool! Now I assume that two questions just pumped into your mind: 1- What the heck is that IsHalwagy() method? 2- Would Microsoft ever -for any reason- reshape their string object to add this method? I will answer your questions from bottom [...]

C# 3.0 New Features – What made LINQ possible! (part 1)

Posted by: Ahmed on: November 19, 2008

Here’s a simple problem. Suppose that you have an array of string and you want to filter this array to extract all the items in it that end with the word “Halwagy” the code would more or less look like the following. string[] names = { “Ahmed Halwagy”, “Mohamed Halwagy”, “Mohamed Fayad”, “Walid Hamad”, “Ibrahim [...]


Calendar

May 2012
S M T W T F S
« Nov    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

Delicious

Recent Twitter Updates

Error: Please make sure the Twitter account is public.

Follow

Get every new post delivered to your Inbox.