我有一个Form
与此类似的代码:
public partial class Form1 : Form
{
private int m_var1;
private int m_var2;
string sMsg;
bool bReturn;
private bool MyFunction()
{
// POINT A: at this point m_var1 and m_var2 are both 100
sMsg = "Test Message";
bReturn = (DialogResult.Yes == MessageBox.Show(sMsg, "MyApp",MessageBoxButtons.YesNo, MessageBoxIcon.Question));
// POINT B: at this point m_var1 and m_var2 are both 0
}
}
为什么POINT B
已经m_var1
和m_var2
两者都变成了0
我正在经历的?