What is this called?
double d1 = 0d;
decimal d2 = 0L;
float d3 = 0f;
And where can I find a reference of characters I can use? If I want to cast 0 to short, which letter I need?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The best source is the C# specification, specifically section Literals.
The relevant bits:
That means the letter (or letters) is called “suffix”. There is no way to represent
shortthis way, so you have to use(short)0, or justshort x = 0;.