Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Pass values between forms w/multiple possibilities

$
0
0

Hi, I'm a beginner so I don't know if this is possible. I need to pass values from form1 to form2, but there is no set number of values that it may pass. It can be 3-7 values depending on how many boxes the user chooses to fill out in the first form. I understand the normal way to pass values where you know for certain how many values are passed. e.g.

private DateTime sdate;
private DateTime edate;
private String street;

public frmInfo(DateTime start_date,DateTime end_date, string instreet)
        {
       InitializeComponent();

       sdate = start_date;
       edate = end_date;
       street = instreet;

If I don't know how many values the user may select, I'm thinking I may have to pass the values of every possible box  and then filter out in form2 those which are populated and proceed from there.

Your help is greatly appreciated.  Thank you.


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>