假设我们有以下放大模型:
int count = 0;
foreach (object control in groupBox1.Controls)
{
if (control.GetType() == typeof(CheckBox))
{
var checkbox = (CheckBox)control;
if (checkbox.Checked)
count++;
}
}
解决优化问题后,我想只显示Take等于1的行
答案 0 :(得分:1)
您可以这样做:
for{o in objects, s in sacks: Take[o,s] = 1} {
printf "\n %s %s", o,s;
}