KYDataParameter[] parameters = new KYDataParameter[12];
parameters[0] = new KYDataParameter("sht", String.Empty);
parameters[1] = new KYDataParameter("mkr", String.Empty);
parameters[2] = new KYDataParameter("opt", String.Empty);
parameters[3] = new KYDataParameter("bll", String.Empty);
parameters[4] = new KYDataParameter("pst", String.Empty);
parameters[5] = new KYDataParameter("flg", -1);
parameters[6] = new KYDataParameter("bdt", DateTime.Now.Date);
parameters[7] = new KYDataParameter("edt", DateTime.Now.Date);
parameters[8] = new KYDataParameter("btp", btp);
parameters[9] = new KYDataParameter("usr", String.Empty);
parameters[10] = new KYDataParameter("exa", String.Empty);
parameters[0] = new KYDataParameter("sht", String.Empty);
parameters[1] = new KYDataParameter("mkr", String.Empty);
parameters[2] = new KYDataParameter("opt", String.Empty);
parameters[3] = new KYDataParameter("bll", String.Empty);
parameters[4] = new KYDataParameter("pst", String.Empty);
parameters[5] = new KYDataParameter("flg", -1);
parameters[6] = new KYDataParameter("bdt", DateTime.Now.Date);
parameters[7] = new KYDataParameter("edt", DateTime.Now.Date);
parameters[8] = new KYDataParameter("btp", btp);
parameters[9] = new KYDataParameter("usr", String.Empty);
parameters[10] = new KYDataParameter("exa", String.Empty);
parameters[11] = new KYDataParameter("pvd", String.Empty);
问题出在这里 由于10和11在下面没用到 我给注释掉了 导致只设置了数组的十条属性 跟定义的长度不符 所以报错。
本来以为不定义就会自动设置为空的,估计错误。