Whats wrong with this seemingly straightforward code?
invoice.GST > gstValue ? invoice.GST -= gstValue : invoice.GST = 0;
VS complains
Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Try this:
invoice.GST = ((invoice.GST>gstValue)?(invoice.GST - gstValue):0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With