i hope this is old question , but yet i need a solution from you . I have a class i.e public partial class form1 and i have initialized some strings here . i want to use the string values in another form . how can i do that .
public partial class Form1 : Form
{
public string firstrange ="" ;
public string firstrange1 ="";
public string lastrange = "";
public string lastrange1 = "";
public string Receivedrange = "";
public string Receivedrange1 = "";
public Form1()
{
InitializeComponent();
}
// while loading form1 , i'm adding some values to the strings from CSV
firstrange = WorksheetSourcee1.UsedRange.Cells[1, 1].Value.ToString();
firstrange1 = WorksheetSourcee1.UsedRange.Cells[1, 2].Value.ToString();
}
Now i want use these strings in another form2 , i just need to get the same string values. can anybody suggest me about it.