foreach statement cannot operate on variables of type 'System.Web.UI.WebControls.Table' because 'System.Web.UI.WebControls.Table' does not contain a public definition for 'GetEnumerator'

错误:foreach statement cannot operate on variables of type 'System.Web.UI.WebControls.Table' because 'System.Web.UI.WebControls.Table' does not contain a public definition for 'GetEnumerator'

foreach (TableRow tr in table)
{
   ...
}

修改为

foreach (TableRow tr in table.Rows)
{
   ...
}

上一篇:C 中va_list,va_arg,va_start,va_end usage


下一篇:Java学习总结:飘逸的字符串