In the following code, the const are defined using two different ways.
const float KS = 0.001F;
const float WW = 0.001f;
Is there any difference between F and f?
Revision 1:
If both are same then why both cases are allowed ?
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.
Nope, no difference between
fandFin this case. It’s the special suffix forfloatliterals, either works fine.With the
longliterals, there’s stylistic difference:l(lowercase) looks a lot like1(the number one). It’s recommended to use capitalLforlongliterals.References
MSDN/C# Programmer’s Reference/float
MSDN/C# Programmer’s Reference/long