I have a code like this in VS 2012:
private void Form1_Load(object sender, EventArgs e)
{
if (Properties.Settings.Default["Database"] != null)
{
MessageBox.Show("We landed on spot 1");
}
else
{
MessageBox.Show("We landed on spot 2");
}
}
I'm pretty sure I messed up the condition syntax, but I would expect that one of these would happen:
- Compiler warns about errors/project fails to run.
- First message is shown
- Second message is shown.
But neither of these actually happens. I've been staring at this for an hour and resources I could find are pretty slim. If anyone with an experience could explain me what actually happens here?
Edit: Thanks to JMK's link I found out this is basically a wontfix bug popping up in VS debugger under Windows x64. Error fires if application is run outside of debugger.