47 mins ago Melodie asked ... How do I remove and change the basket? Duratech Identity Gu?    |    Kathy asked ... Samsung ER-4915?    |    Mark asked ... Oven door removal?    |    Jt asked ... Where to buy mt270x petrol cap?    |    Jo asked ... How to engage clutch on old sewing machine to engage needle?    |    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