3 mins ago Sandy asked ... Replace vertical gear on Singer Fashion Mate 252?    |    Blaablaa asked ... How can I fix?    |    pete asked ... Flymo 330 turboglide?    |    keith asked ... Fuseboard( s) location of renault trafic t1100 1993?    |    Janet asked ... Neff B1641 door not closing at top?    |    Click here to ask your question

Could someone give me a simple show form example for C#?

I'm struggling with the basics in C#
I can't show a form. In VB.net this worked....
Dim testDialog As New Form2()
testDialog.show

What is the equivalent in C#?
Tas, April 2004
form myForm = new Form1;
myForm.ShowDialog();


The first line here declares myForm as new instance of the form you have created Form1.

The second line here displays the form (modally.) To show non-modal forms use ".Show();"

pazy, August 2006