1

Anyone know what the C# "M" syntax means?

var1 = Math.Ceiling(hours / (40.00M * 4.3M));

3 Answers 3

8

it means that the number is a decimal type.

7

M is the suffix for Decimal. Stands for "money" I assume.

http://msdn.microsoft.com/en-us/library/364x0z75(VS.71).aspx

5

The default interpretation of 40.00 will be a double with the value 40.00, just like the default interpretation of 40 is an int.

If you want a decimal or a long instead, you add can append the M (decimal) and L suffixes (long).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.