Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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/

like image 587
Matthew Vines Avatar asked Jun 02 '10 15:06

Matthew Vines


2 Answers

It's called a data type suffix.

like image 136
David M Avatar answered Oct 21 '22 03:10

David M


I don't know if there is an official term but the C# language spec commonly refers to them as type suffixes.

like image 21
JaredPar Avatar answered Oct 21 '22 01:10

JaredPar