Archives for C# 3.0 +
LINQ–search for items in a list that are present in another list
Suppose you have a list of strings – a nursery rhyme may be a good ; And you need to find ALL the words that match from another list of…
LINQ versus looping–Performance
Looping and Iterating is bad for performance right? So – a loop like the one below should be bad. for (int i = 0; i <= iterations; i++) { foreach…
Use Funcs only if you want results back
If you are trying to encapsulate a method that returns a value, Funcs are ideal. However, what if your method returns void? Func will not work (Funcs were designed to…
Delegates in C# – pre-lambda and post-lambda expressions
Delegates are amongst the most powerful constructs in the C# language (Full Solution Download at the end of this article). Some uses of delegates in c# include : Delaying invocation(calling)…
LINQ–notes from the field
Using LINQ on .NET collections Often times, you have to deal with regular collections such as ArrayLists, DataSets etc. These collections: Are not strongly typed (unlike Arrays, Dictionaries, GenericLists which…