first time doing this so i hope its not too bad, but i got a really annoying error that i dont know how to fix, im trying to make a tool for a game that i play, and im trying to make a sort of save file and i want to save the contents of my combo box to a notepad but i get an error, i have tried quite alot of things, but before i didnt get an error, but it didnt write anything to the file, its really annoying me!!! Thx!
add button code
StreamWriter sw = new StreamWriter("Current.txt");
{
sw.WriteLine(cboCondition.SelectedValue.ToString());
sw.Close();
}
program combo box http://gyazo.com/61c8628a0d266e5d2672fd1d9c58e22e
Error is this
An unhandled exception of type 'System.NullReferenceException' occurred in ZyTrading Tool.exe
Additional information: Object reference not set to an instance of an object.