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
Post a Comment