Why should I never use 0 in a flag enum [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Should an Enum start with a 0 or a 1? Why should I never use 0 in a flag enum? I have read this multiple times now and would like to know the reason :) 回答1: Because Flag enums are bit collections, or sets of options. A 0 value would be part of all sets, or of none. It just wouldn't work. 回答2: Why should I never use 0 in a flag enum? The question is predicated on an incorrect assumption. You should always use