Per inciso, lascia stare MsgBox (mantenuta per compatibilità con VB6) e usa MessageBox.Show.
Amaro C++, il gusto pieno dell'undefined behavior.
Regole del Forum