View Single Post
Old Apr 7th, 2008, 11:16 PM   #2
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 754
Rep Power: 3 Jimbo is on a distinguished road
Re: The immutability of strings

It creates 3. One ("James"), two (" is testing this"), and a third to store the result ("James is testing this")

Nursing the efficiency of String vs. StringBuilder is often not going to get you much benefit. Of course, there are loops that are vastly improved by the change, but often it's easier to just use String.
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is offline   Reply With Quote