Hello iam wont to open a new form but its say error "embedded statement cannot be a declaration or labeled statement".
The code is:
`Form2 f2 = new Form2();
f2.Show;
this.Close; `
thanks alot!
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Guest UserRank #816 · 2.8K reputationPosted Oct 22, 2018, 10:46 PM EDT
Piyush PansuriyaRank #454 · 5.5K reputationPosted Oct 23, 2018, 12:00 AM EDT
Or Kadosh14 reputationPosted Oct 22, 2018, 10:54 PM EDT
Jaish MathewsRank #225 · 11K reputationPosted Oct 22, 2018, 11:19 PM EDT
Or Kadosh14 reputationPosted Oct 22, 2018, 11:23 PM EDT
Jaish MathewsRank #225 · 11K reputationPosted Oct 22, 2018, 11:26 PM EDT
Or Kadosh14 reputationPosted Oct 22, 2018, 11:34 PM EDT
Jaish MathewsRank #225 · 11K reputationPosted Oct 23, 2018, 12:04 AM EDT