Alex Rivera | Logout

What is the 'd' in the literal 12d called?

Asked 2010-06-02T15:17:02.020
10

I feel like I should know the answer to this, but I don't.

What is the type character on a numeric literal called?

double myDouble = 12d;
float myFloat = 10f;

I wanted to find a complete list of them today, but couldn't come up with what to ask Google to search for.

EDIT

Found a decent list if anyone is interested

http://www.undermyhat.org/blog/2009/08/secrets-and-lies-of-type-suffixes-in-c-and-vb-net/

Edit
Report

1 Answer

12

Numeric Literal Suffix

A list:

  • uint: u
  • long: l
  • ulong: ul
  • float: f
  • decimal: m
answered 2010-06-02T15:18:34.327

Your Answer