转换ForEach循环 [英] Convert the ForEach loop

查看:89
本文介绍了转换ForEach循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,从以下代码我希望转换vc ++中的foreach循环

有人可以帮助我吗?



Hi from below code I wish to convert the foreach loop in vc++
Does anybody can help me?

TableLayoutPanel SuplrTblPnl = new TableLayoutPanel();
                if (C1 == 1) SuplrTblPnl = tableLayoutPanel1;
                foreach (Control InvConl in SuplrTblPnl.Controls) {

}
                {



前两行已转换


The first 2 line already converted

TableLayoutPanel^ SuplrTblPnl = gcnew TableLayoutPanel();
 if (C1 == 1) SuplrTblPnl = tableLayoutPanel1;





但是当我转换第三行时,如下所示



But while I convert the third line like the below

foreach (Control^ InvConl in SuplrTblPnl->Controls) {
facing the error InvConl is undeclared Identifier





谢谢。



Thank you.

推荐答案

为每个...........发现空间解决方案
for each ...........found the solution by space


这篇关于转换ForEach循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆