“System.StackOverflowException”类型的未经处理的错误出现在 WindowsBase.dll 中
“System.StackOverflowException”类型的未经处理的异常出现在 WindowsBase.dll 中
哪位大牛帮忙看下
private void PatientSelectionChanged(object obj) {
if (obj != null) {
CurentStudy = obj as V_PatientBoxBing;
}
}
这个方法是点击列表时将所选项赋值给CurentStudy,将详细信息显示出来
第一次点击列表时可以正常显示出来,只要点击第二条记录时,执行到CurentStudy = obj as V_PatientBoxBing就会提示“System.StackOverflowException”类型的未经处理的异常出现在 WindowsBase.dll 中。
提示说用到死循环会提出此错误,我也没循环啊,麻烦各位帮忙看看。
------解决思路----------------------
这样试试呢
CurentStudy =null;
CurentStudy = obj as V_PatientBoxBing;
哪位大牛帮忙看下
private void PatientSelectionChanged(object obj) {
if (obj != null) {
CurentStudy = obj as V_PatientBoxBing;
}
}
这个方法是点击列表时将所选项赋值给CurentStudy,将详细信息显示出来
第一次点击列表时可以正常显示出来,只要点击第二条记录时,执行到CurentStudy = obj as V_PatientBoxBing就会提示“System.StackOverflowException”类型的未经处理的异常出现在 WindowsBase.dll 中。
提示说用到死循环会提出此错误,我也没循环啊,麻烦各位帮忙看看。
------解决思路----------------------
这样试试呢
CurentStudy =null;
CurentStudy = obj as V_PatientBoxBing;