我不知道为什么我不能处理这个异常是由代码引起的:无法处理StackOverflowException C#
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) { }
}
Image: Unhandled StackOverflowException
'StackOverflowException'是您无法捕捉的异常之一。 –