Fundamental question about boxing / c#
- by maxp
Is it possible to change the value stored inside bar after it has been added?
I have tried 'boxing' the string foo but it doesnt work.
string foo = "aaaaaaa";
var bar = new System.Web.UI.HtmlControls.HtmlGenericControl("div") { InnerHtml =foo };
foo = "zzzzzz";
plcBody.Controls.Add(bar);//want this to contain 'zzzzzz'