Sam

Sam

  • NA
  • 112
  • 0

What the difference: double x = 5 AND double x = 5d?

Aug 4 2007 5:50 PM

Hi All,

Just something about C# that I've never truely understood

What do the suffixes (f, d, m, u, l etc)  actually mean.

i.e what is the differnect (if any) between the following pairs of statements:

double x = 5 AND double x = 5d

double y = 1.2 AND double y = 1.2d

(and equivilent statements for floats and decimals)

Any simple explainations or references will be appreciated.

Thanks,

Sam.

 


Answers (5)