communication between two C# forms

  • Thread starter Thread starter satender kumar via .NET 247
  • Start date Start date
S

satender kumar via .NET 247

(Type your message here)
how to pass data from one form to other

when i click on the button of form1
i need to pass data to form2 with click event of the button of form1
 
Make your own class that will contain the data you have to pass to the
second form.

Make an object of that class, initialize the fields with the data. And pass
this object in the constructor of the second form

Simple Isn't it :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top