What is the .NET equivalent of StringBuffer in Java?
43,920
It's System.Text.StringBuilder
. Note that in modern Java you'd use java.lang.StringBuilder
too. (It's like StringBuffer
, but without the synchronization - I can't remember the last time I wanted the synchronization of StringBuffer
. Note that the .NET StringBuilder
isn't thread-safe either, but again, I can't remember the last time I found that to be a problem.)
Comments
-
The Internet over 1 year
What is the .NET equivalent of
java.lang.StringBuffer
? -
fadden about 8 yearsYou don't want the synchronization of StringBuffer, ever -- it doesn't actually make code thread-safe. See jeremymanson.blogspot.com/2008_08_01_archive.html