参数object是个无法确定大小的object[]数组类型,
而且object[]不支持foreach来遍历
解决方案:
string str = "";
if (result is System.Object[])
{
int imax = (result as object[]).Length;//确定数组的大小
for (int i = 0; i < imax; i++)
{
str += (result as object[]).GetValue(i).ToString()+"<br>";
}
}
this.Label1.Text = str.ToString();