【发布时间】:2015-11-03 15:01:33
【问题描述】:
我不知道为什么我无法处理由该代码引起的异常:
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) { }
}
【问题讨论】:
-
StackOverflowException是您无法捕获的异常之一。
标签: c# .net exception exception-handling stack-overflow