我想取出泛型类的值,代码如下:
foreach( IEnumerator<QuestionChild> ien in myQuestionChild.GetEnumerator )
{
string sql = "SELECT PK_Product,PK_Corp,ProdName,Spec,Model,Price,ProdBrief
,Capacity,TS,Status,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10 FROM Production WHERE PK_Product= "+ien.Current.PK_Product;
List<Production> myAllTPlan = RunProcGetVO(sql);
}
出现错误:foreach语句无法在方法组上执行。
请高手指教!
foreach( IEnumerator<QuestionChild> ien in myQuestionChild.GetEnumerator )
{
string sql = "SELECT PK_Product,PK_Corp,ProdName,Spec,Model,Price,ProdBrief
,Capacity,TS,Status,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10 FROM Production WHERE PK_Product= "+ien.Current.PK_Product;
List<Production> myAllTPlan = RunProcGetVO(sql);
}
出现错误:foreach语句无法在方法组上执行。
请高手指教!
for (int i = 0; i < myQuestionChild.Count; i++)
{
//myQuestionChild[i].Current.PK_Produc...
}
for (int i = 0; i < myQuestionChild.Count; i++)
{
//myQuestionChild[i].PK_Produc...
}
之后运行成功,