【发布时间】:2014-07-02 05:50:31
【问题描述】:
这是我的代码 1 索引打印第二个索引显示错误 "Index was outside the bounds of the array." 请帮助我该怎么办?
string[] SName = Request.Form.GetValues("title");
string[] Email = Request.Form.GetValues("fname");
for (int i = 0; i <= SName.Length - 1; i++)
{
Response.Write(SName[i]);
Response.Write(Email[i]);
}
【问题讨论】:
-
for (int i = 0; i < SName.Length - 1; i++)删除条件上的等号。