c# - Whats the opposite opperation for += using strings? -


for example have

string a="hello"; a+="world"; 

this put world @ end. how can put @ beginning?

simply:

string = "hello"; = "world" + a; 

ultimately, a += "world"; abbreviated syntax for:

a = + "world"; 

no such abbreviation exists if want reverse order of operands.

as side note - keep in mind if doing lot (in loop etc) may better consider stringbuilder avoid lots of intermediary strings.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -