This is my second article regarding performance. Most of the people use string everywhere in their code. Actually when doing string concatenation, do you know what exactly your doing? It has a big drawback mainly in concatenation which can be overcome by StringBuilder. It will give vast improvement in performance when you use concatenation of string over String.
What is the exact difference?
First we will look at what happens when you concatenate two strings. For a rough idea, think like this. In a loop you are adding few numbers to get a string to give all the numbers.
string returnNumber = "";
for(int i = 0; i<1000;i++)