<combobox grid.column="1" name="myCombobox" selectedindex="0" horizontalalignment="Right" verticalalignment="left"> </combobox>
MyFile.cs private void MyFunction(object sender, RoutedEventArgs e) { string firstval = ""; if(MyCheckbox.IsChecked == false) { .... } firstval = myCombobox.Text.ToString(); //here NullReferenceException occurs else firstval = myCombobox.Text.Substring(5); }
firstval = myCombobox.Text.Substring(5);
ToString()
Text
myCombobox.Text
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)