There are two DLLs, A and B, in A.DLL there is a form class similar to this:
namespace AAA
public class AForm: Form
{
...
private void btnOK_Click(object sender, EventArgs e)
{
DoSomeSth();
}
}
B.DLL has code like this
try
{
AForm dlg = new AAA.AForm();
dlg.ShowDialog();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
There will be an exception in the DoSomeSth function after clicking OK. When I debug code with vs2005, the exception can be caught in B.DLL, but if I started the application directly without debugging, the exception will not be found in B.DLL, what is the reason?
source
share