I am wondering, will VS compiler optimize this:
Code:
myObj.weap.mymy.ariari += "optimized?";
uselessBox.Show();
myObj.weap.mymy.ariari += "eh, eh?";
....
myObj.weap.mymy.ariari += "still?";
myObj.weap.mymy.ariari += "howaboutnow??";
I want it to actually do this:
Code:
string tmpStr = myObj.weap.mymy.ariari;
uselessBox.Show();
tmpStr += "eh, eh?";
....
tmpStr += "still?";
tmpStr += "howaboutnow??";
So it doesn't search everytime to find ariari through 3 references. The answer would be "of course" if there wasn't for "uselessBox.Show();" for all the compiler now can alter ariari so tmpStr will point to nowhere. Of course it could try to check that, so my question still stands