25 lines
399 B
C#
25 lines
399 B
C#
double d = 1;
|
|
d = 1d;
|
|
d = 1D;
|
|
d = 1.2; //double is the default if there's no suffix
|
|
d = 1.2d; //The suffix is redundant here
|
|
d = .2;
|
|
d = 12e-12;
|
|
d = 12E-12;
|
|
d = 1_234e-1_2; //digit separators are allowed since C# 7
|
|
float f = 1;
|
|
f = 1f;
|
|
f = 1F;
|
|
f = 1.2f;
|
|
f = .2f;
|
|
f = 12e-12f;
|
|
f = 12E-12f;
|
|
f = 1_234e-1_2f;
|
|
decimal m = 1;
|
|
m = 1m;
|
|
m = 1m;
|
|
m = 1.2m;
|
|
m = .2m;
|
|
m = 12e-12m;
|
|
m = 12E-12m;
|
|
m = 1_234e-1_2m;
|