出错label1.Text = Name_shezhi.name[1].ToString(); 未将对象的引用到对象的实例
另一个页面 public static string[] name=new string[1000];
出错label1.Text = Name_shezhi.name[1].ToString(); 未将对象的引用到对象的实例
另一个页面 public static string[] name=new string[1000];
你初始化了数组不等于初始化了数组中的对象,相反,这个对象中的每个元素还是null的。
你可以这么写:label1.Text = Name_shezhi.name[1] ?? "";