Tag Archives: C#

There is a ‘forr’ code snippet for reverse ‘for’ loop

By | August 28, 2013

Couple of days back we have discussed about one of the hidden and very useful code snippet, ‘propfull – for property and backing field’. Today you will learn another interesting code snippet ‘forr’. Yes, you read it correctly ! ‘forr’ . You must be familiar with ‘for’ code snippet  that generates basic for-loop structure.  Where as, ‘forr’ generates the… Read More »

Sort Generic List Using Lambda Expression For Dynamic Type And Dynamic Property

By | September 17, 2011

Once stuck on a requirement where I needed to write a code which is flexible and generic enough to sort any type of collection and also the property based on which it has to be sorted will be dynamic. After trying many options I discovered myself how easy it is to hit this requirement using Lamda Expression.

How to Pass Command Line Arguments using Visual Studio ?

By | September 16, 2011

You are writing one application in Visual Studio which accepts some command line parameter to do some operation. You pass command line arguments to the program when it’s been invoked  from the command line. But how did you do it from Visual Studio ?  You want to test your application and do you really want to open command… Read More »

Maps Keys to a Collection of Values using Lookup Collection

By | September 12, 2011

Most of us are very familiar with Dictionary Collection which supports only one value per key mapping. But, what if, if you came across with some situation where you need to map keys with collection of elements ? Do we really need to create a custom collection ? I will say, NO.  C# provides another Collection type called… Read More »