Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

can some one suggest what's wrong in my ulong declaration (i hope my value is wrong and not necessary to declare as public)

C#
public static ulong SecondsInADay = 86399;
Posted
Updated 12-Sep-12 21:45pm
v2
Comments
[no name] 13-Sep-12 3:59am    
This line of code by itself is OK.
Did you have get any error?
GANESH SHAN 13-Sep-12 4:13am    
Meysam Tolouee,thanks for your reply, no i was going thru some questions found this one and trying to find the answer,that's it

1 solution

I can see two possible improvements:


  1. A literal of an unsigned long should be marked as such 86399UL. See MSDN ulong[^]
  2. A day most certainly has 86400 seconds. There is one second missing from your number. What did you do with it?

Regards,
— Manfred
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900