I have a variable, DifferenceAmt
, which is a decimal. It can be either negative or positive. I need to output the value of DifferenceAmt
, but without the negative sign if it's negative, as a string. I know how to delete the negative sign by checking first if DifferenceAmt
is less than zero, and then doing a substring from the 2nd character if it is, but this seems cumbersome. I've tried converting DifferenceAmt
to a UInt64 first,
UInt64 differenceamt = (UInt64)DifferenceAmt;
but I keep getting an error message that the number is too big for a UInt64 (even when it's -10, for example). How can I do this?