June 13, 2009 at 7:41 pm
I am building a string for a series of smaller strings. Which option is more efficient ?
Build the string using the & Operator
Build the string using the StringBuilder Object
Build the string using StringCreator Object
Build the string using the += Operator
June 13, 2009 at 9:43 pm
These look like C# of VB.NET questions, not SQL Server.
You can test these, write a loop to build 10,000 of each one, look at the cost/time of each.
June 13, 2009 at 10:00 pm
Like Steve said, this may be better suited for the .Net forums, but just like everything. It depends. I rarely use StringBuilder when I code. I only use it when I have a lot of concatenation to do. I don't think there is any difference between + and & other than syntax.
This article has some good guidelines.
June 13, 2009 at 10:40 pm
Thanks for the article Ken it was really helpful.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy