我正在处理一个 .NET 项目,我应该从 Web 服务获取数据,然后在 Telerik 报告中显示这些数据。问题是我的代码进入异常“对象引用未设置为对象的实例”。 public CertifikatePersonale(string ssn) { string COUNTY = null; string FATHER_NAME = null; try { ArrayList list = new ArrayList(); SkyServices service = new SkyServices(); object [] merrcertifikate = getPerCertificate(ssn); for (int i = 0; i < merrcertifikate.Length; i++) { string SSN = ((string)(merrcertifikate[1])); string LAST_NAME = ((string)(merrcertifikate[2])); FATHER_NAME = ((string)(merrcertifikate[3])); string ADDRESS = ((string)(merrcertifikate[4])); string GENDER = ((string)(merrcertifikate[5])); string BIRTH_PLACE = ((string)(merrcertifikate[6])); string BIRTH_DATE = ((string)(merrcertifikate[7])); string MOTHER_NAME = ((string)(merrcertifikate[8])); string MARITAL_STATUS = ((string)(merrcertifikate[9])); COUNTY = ((string)(merrcertifikate[10])); string DOCUMENT_TYPE = ((string)(merrcertifikate[11])); string DOCUMENT_ISSUE_DATE = ((string)(merrcertifikate[12])); string DOCUMENT_EXPIRATION_DATE = ((string)(merrcertifikate[13])); string RESPONSE = ((string)(merrcertifikate[14])); string RESPONSE_DATA = ((string)(merrcertifikate[15])); } txb_Nation.Value = COUNTY.ToString().ToUpper(); } catch { } }行 txb_Nation.Value = COUNTY.ToString().ToUpper(); 即使 County 具有值也会导致异常。请帮助,这比它应该花费更多的时间。谢谢
- 2 回答
- 0 关注
- 162 浏览
添加回答
举报
0/150
提交
取消