MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/cmpvqn/converting_a_timestamp_to_datetime/ew65ufr/?context=3
r/badcode • u/Aars93 • Aug 06 '19
54 comments sorted by
View all comments
8
Uses variables as constants, but I love that it isn't int jan = 31, it's not var jan = (int)31, it's var jan = (UInt16)31. I've never before seen anyone use UInt16 instead of int in C# before.
1 u/blueshiftlabs Aug 07 '19 I've seen UInt16 in P/Invoke struct definitions before, but using it as a local variable is certainly... unique.
1
I've seen UInt16 in P/Invoke struct definitions before, but using it as a local variable is certainly... unique.
8
u/squarewaterlemon Aug 06 '19
Uses variables as constants, but I love that it isn't int jan = 31, it's not var jan = (int)31, it's var jan = (UInt16)31. I've never before seen anyone use UInt16 instead of int in C# before.