Click here to Skip to main content

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.


 
GeneralRe: This explains that last meeting I was in PinmemberMark_Wallace20-Mar-13 23:22 
GeneralDoes this language feature seem strange to anyone else? Pinmemberlewax0020-Mar-13 12:58 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberPIEBALDconsult20-Mar-13 13:43 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0020-Mar-13 14:00 
GeneralRe: Does this language feature seem strange to anyone else? PinprotectorAspDotNetDev20-Mar-13 14:04 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0020-Mar-13 14:11 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberPIEBALDconsult20-Mar-13 14:17 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberMatthew Faithfull20-Mar-13 14:10 
Believe it or not that's what I would expect.
Remember that C# has its roots in C++ and in C++ everything can be validly initialised with a 0. It's an odd rule and one that seldom gets mentioned but we actually make a deal of use it to do things like initializing structures with {0} apart from every null initialised pointer prior to C++11's nullptr constant, which evaluates to, you guessed it, 0.
In C++ Enums have no choice but to participate so enum types can also always be initialised with 0. It's so rare for enums not to have a zero valued member and for it to be an issue that I've never even considered what happens when an Enum with no zero valued member is initialised with 0 but I would expect it to 'work' in the sense of not raising more than a minor warning and to run and for the variable to have the value 0.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)

GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0020-Mar-13 14:13 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberMatthew Faithfull20-Mar-13 14:29 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0020-Mar-13 14:39 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberMatthew Faithfull20-Mar-13 15:10 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberMike Winiberg21-Mar-13 22:14 
GeneralRe: Does this language feature seem strange to anyone else? PinprotectorAspDotNetDev20-Mar-13 13:56 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0020-Mar-13 14:06 
GeneralRe: Does this language feature seem strange to anyone else? PinprotectorAspDotNetDev20-Mar-13 14:09 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberjschell21-Mar-13 10:04 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0021-Mar-13 10:27 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberCésar de Souza22-Mar-13 0:43 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0022-Mar-13 10:58 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberenglebart22-Mar-13 2:26 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0022-Mar-13 10:41 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberRafagaX22-Mar-13 6:40 
GeneralRe: Does this language feature seem strange to anyone else? PinmemberChadwick Posey22-Mar-13 7:48 
GeneralRe: Does this language feature seem strange to anyone else? Pinmemberlewax0022-Mar-13 10:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 20 Apr 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid