Reputation: 38029
I ran across this sample on MSDN which uses leading zeros when initializing an int.
... new Category(){ Name="Condiments", ID=001}...
Is there a difference from just using
... new Category(){ Name="Condiments", ID=1}...
Upvotes: 1
Views: 531
Reputation: 283773
No, there's no difference.
In many other C-like languages (including C itself), the leading zero would indicate an octal literal. But not in C#.
Upvotes: 7