How to share data between forms?

Add a public property to your Form2 class that returns the selected item.

Then, replace the Show() call with ShowDialog() (a blocking method) and check the property afterwards.

Also, rename your forms.

Leave a Comment