日期:2014-05-17 浏览次数:20929 次
getdate(obj[0]);
Quote: 引用: public void test(params object[] a) { for (int i=0;i<a.length;i++) { cw(a[i]); } } test("a"); test("a","b"); test("a","b","c"); test(1); test(1,2); test(1,2,"a",null); 当我传了对象1给Test(),函数里该怎么把对象1赋给GetData()里的参数1呢
public void test(params object[] a) { for (int i=0;i<a.length;i++) { cw(a[i]); } } test("a"); test("a","b"); test("a","b","c"); test(1); test(1,2); test(1,2,"a",null);
public void Test(params object[] obj) { GetData(obj[0],null)//参数1只能被Test里的对象1赋值 }