The decimal keyword indicates a 128-bit data type. Compared to floating-point types, the decimal type has more precision and a smaller range, which makes it appropriate for financial and monetary calculations.
You can use a decimal as follows:
decimal myMoney = 300.5m;
No comments:
Post a Comment