Pages

Tuesday, September 13, 2011

Does StringBuilder always better than String in string concatenation?

No.

Why?

Use StringBuilder if you are creating a long string using a loop, when the number of string are high.
Do not use StringBuilder for small number of strings becuase, it makes the code less manageable and StringBuilder contains more logic than string, when it comes to processing the string.

No comments:

Post a Comment