日期:2014-05-18 浏览次数:20934 次
class a { public string strA; public string strB; public a(string sa, string sb){ this.strA = sa; this.strB = sb; } } //第一种 a test = new a { strA = "abc", strB = "def" }; //第二种 a test = new a(); test.strA = "abc"; test.strB = "def";