>If you're running in a loop the entire string routine should probably be going into StringBuilder(). String concatenation in .NET is expensive because every string - dynamic or static - requires an object reference. While they are short lived they use memory and use the heap and .NET has to keep track of it and clear out those references. So if you're doing under 10 concats total there's no need to use a StringBuilder. Anything more StringBuilder starts making sense in addition to often being an easier interface to output string data.
Correct, but in here, even if it goes in the loop, it's mostly for verification and ajust very rarely some words. It is not a concatenation. As I have adjusted the code to avoid passing a long string in there, basically just the average daily SQL command, this is ok as is. It is just that for a while, I was testing a new approach and this was a very big SQL command. So, while checking in there, I found out it was taking 0.7 extra second to parse and verify. But, in both ways, they were pretty much the same. The string was enormously big, so it would have taken pretty much the same amount of time in both approaches. But, that is already old code. The actual code is the one that was there before and the string length is controlled. String does the job pretty good.
Thanks