Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 924715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:24:11+00:00 2026-05-15T19:24:11+00:00

If I want to use a decimal literal in code, I have seen that

  • 0

If I want to use a decimal literal in code, I have seen that there exists the m-suffix (where m stands for money). Is this appropriate for any decimals or is there a more general assignment (d stands for double, that is for sure not the right thing although a direct conversion is supported).

object decimalValue=2m;

Please note, I took the object-assignment as example, because in the case of …

decimal decimalValue=2;

… it’s implicitly clear that 2 should be interpreted as decimal through the compiler.

m seems to be ok, msdn uses it as example for the decimal type.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:24:12+00:00Added an answer on May 15, 2026 at 7:24 pm

    Documented in the C# language specification, chapter 2.4.4:

    float f = 1.2f;
    double d = 1.2d;
    uint u = 2u;
    long l = 2L;
    ulong ul = 2UL;
    decimal m = 2m;
    

    Nothing for int, byte, sbyte, short, ushort.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use this 1 for using Bar code or QR code scanner. I
I have the following DLL ('arrayprint.dll') function that I want to use in Python
I have got output and I want to use only three values after decimal.
I have an input which can be decimal or numeric. I want to use
i want to format number entered by user in dutch format. ie. use decimal
i want use some data from a website with web service. i have a
I don't want use old Visual Basic methods in my code, and I'm confused
I have a list that contain two colums which are type currency. I want
I have a third party c dll which I want to use in my
Whenever I have some records/objects that I want to be in a certain order,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.