Static Variable Instances and AppDomains, what is happening?
问题 I have public static class A { public static string ConnString; } [Serializable] public class Test{ // Accesing A's field; public string ConnString{get{return A.ConnString;}set{A.ConnString=value;}} } void Main() { A.ConnString = "InitialString"; // I set A.ConnString in the current domain var newDomain = AppDomain.CreateDomain("DomNew"); Test TObj = newDomain.CreateInstanceAndUnwrap(typeof(Test).Assembly.FullName, typeof(Test).FullName) as Test ; TObj.ConnString = "NewDomainString"; // It is