解决办法:转换前先判断。 例子: if(this.dcdept.table[0].row.count>0) this.dept.Text=dcdept.Tables[0].Rows[0][0].ToString();