Don asked ... Find the charger or how to convert the battery?    |    Tanzania asked ... How can i mend my sanyo fwbp505f q?    |    Mark Goodwin asked ... Mount field 725m ride on mower?    |    Joan Sorrentino asked ... Barcalounger issue?    |    David asked ... Not starting until I bang door closed?    |    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