I am getting the error "reference not set to an instance of an object" when the following code occurs on startup:
switch (Popup_Data_Type_ComboBox.SelectedItem.ToString())
{
I am pretty sure that this error is occurring as Popup_Data_Type_ComboBox has not yet been created therefore its not possible to get the sting value. How Can I get around this problem?
Ok thanks a lot for all the help I threw in a check if Popup_Data_Type_ComboBox.SelectedItem == null and it now works fine
Popup_Data_Type_ComboBoxbefore trying to access it.Popup_Data_Type_ComboBoxorPopup_Data_Type_ComboBox.SelectedItemisnull