is there any performance difference ..

  • Thread starter Thread starter anoj
  • Start date Start date
A

anoj

Hi All

is there any performance difference between using operators + and &
while concatinating the strings.
 
is there any performance difference between using operators + and &
while concatinating the strings.

No I don't believe so - However, if you want explicit string concatenation
it is better ot use the & sign. The + operator maybe treated as addition
rather than concatenation.

But if you need fast string concatention use the StringBuilder class.
 
Lucas Tam said:
No I don't believe so - However, if you want explicit string concatenation
it is better ot use the & sign. The + operator maybe treated as addition
rather than concatenation.

But if you need fast string concatention use the StringBuilder class.

In addition to that, I suggest to read the documentation for the '+' and '&'
operators and the 'StringBuilder' class.
 

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

Back
Top