
language constructs in c# 3.0 and upwards
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 (int j in data)
{
… Continue reading
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 wrap methods with return values only). However, a similar construct, … Continue reading
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) of a method
Dynamically assigning target(s) to a method
Advanced eventing patterns using c# … Continue reading
Using LINQ on pre-3.0 .NET collections
Often times, you have to deal with regular pre-3.0 collections such as ArrayLists, DataSets etc. These collections:
Are not strongly typed (unlike Arrays, Dictionaries, GenericLists which are all strongly typed)
Do not implementIEnumerable<T> – a pre-requisite for … Continue reading