I have declared this list:
public ObservableCollection<Order> Orders { get; set; }
and then tried to create an object and add it to the list here:
Order curOrder = new Order(method, category, surchargeYesRadio.Checked, double.Parse(numTxt.Text));
Orders.Add(curOrder);
but for some strange reason, on the second line, it's throwing a null reference exception and breaking the program. I looked at my local variables and it shows it as having set values and everything. A screenshot is below:
Thanks in advance. I'm really confused.