I am trying to use inheritance to pass a string from one form to another using a ref.class. Im looking at it and to be honest I think this should work. But when debugging nothing comes up in my settings textBox...
Here is my reference Class:
class Ref
{
private String _url;
public String Sett
{
set { _url = value; }
}
public String Gett
{
get { return _url; }
}
and I am setting it from the main form and getting it from a settings form
Here is my main Form:
private void webBrowser1_DocumentCompleted(object sender,WebBrowserDocumentCompletedEventArgs e)
{Ref reff = new Ref();
this.Text = webBrowser1.Document.Title + " - NHS Cerner Booking Dash";
textBox1.Text = webBrowser1.Document.Url.ToString();
reff.Sett = webBrowser1.Document.Url.ToString();
and finally this is my Settings form
public void load()
{
Ref reff = new Ref();
textBox3.Text = reff.Gett;
}
Im sure this looks a bit complicated. So to clarify I want to take the URL from the main form and set it to my ref.class and then get it from the Ref.class to set it to a textBox in my Settings form. Thank you for looking.