so i am trying to do a basic C# windows application.
I have a form that calls another form (Modal)
The settings form needs to access some vars from the parent form
So i am not sure the best way , but i thought i would try this::
SettingsForm settingsForm = new SettingsForm();
then in the settings form i tried::
public void setParent(Form1 form1)
this.parent = form1;
tbServerURL.Text = parent.ServerURL;
tbDatFileLocation.Text = parent.DataSourceLocation;
When i call the method that opens the modal form i get the error:::
System.NullReferenceException was unhandled
Message=Object reference not set to an instance of an object.
I am sure this is some very rookie misunderstanding of the language.
Any help would be appreciated