我不知道为什么我无法处理由该代码引起的此异常:
private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
for (int i = 0; i < checkedListBox1.Items.Count; i++)
{
int id = int.Parse(((DataRowView)checkedListBox1.Items[i])[0].ToString());
bool check = checkedListBox1.GetItemChecked(i);
DataRow[] dr = dt.Select("id = " + id.ToString());
dr[0][2] = check;
}
}
catch (StackOverflowException) { }
}
Run Code Online (Sandbox Code Playgroud)