Category 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 »

The String Intern Pool

By | February 12, 2012

String forms a large part of a program. Irrespective of what the program is used for, almost 70% of the actual program code (approx) is generally formed by strings. As we all know .NET strings are immutable. Producing large number of string constants inside a program or assigning same string to more than one objects can eat up… Read More »

Application State, Suspension and Termination of Apps in WinRT

By | November 4, 2011

WinRT application model is completely different than the existing application models. The Metro style applications are meant to work differently with least user intervention on the apps. So the user for the Metro application does not need to close the application ever. The operating system takes care of memory constraint and suspend the application or even terminate the… Read More »

Automate Assembly Build Version

By | October 16, 2011

It is the most common requirement to many of us to show the proper assembly version and build version to our application. Now for every version you can either choose your assembly version yourself, or rather you try to find some alternative that Visual studio automatically increments the value of your Build version and/or assembly Version. In this… 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 »