带逗号的字符串变成数组
string[] builtWay = b.builtWay.Split(',');
for (int i = 0; i < builtWay.Length; i++)
{
foreach (Control c in Panel1.Controls)
{
if (c is CheckBox)
{
CheckBox cb = (CheckBox)c;
if (cb.Text == builtWay[i])
{
cb.Checked = true;
}
}
}
}
浙公网安备 33010602011771号