String concatenation

O

Owen Corpening

the String class is required in .Net yet it doesn't seem to provide suuport
for the "+" operator, you have to litter your code with "String::Concat"
everywhere you want to concatenate strings.

Does everyone use other string classes and just convert at the end when they
have to pass a String? What is the desireable method to resolve this?

owen
 
J

Jochen Kalmbach [MVP]

Hi Owen!
Does everyone use other string classes and just convert at the end when they
have to pass a String? What is the desireable method to resolve this?

StringBuilder?

If you always concatenate strings (or if you are using the +-operator in
C#), wvery time a new string is created and therefor many unused strings
which GC must collect...

The suggested way is to use System::Text::StringBuilder

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top