संभव डुप्लिकेट:
When you use flag(Enum) you have a limit of 64. What are the alternative when you reach the limit?बहुत सारे सामानों के साथ झुकाव; अंतिम मूल्य बहुत बड़ा है। मैं इसे कैसे हल करूं?
मैं निम्नलिखित [Flags] enum
33 तत्व होते है:
[Flags]
public enum Types
{
None = 0,
Alarm = 1,
Exit = 2,
Panic = 4,
Fire = 8,
Tamper = 16,
Key = 32,
Line = 64,
FTC = 128,
Unused = 256,
tech_1 = 512,
//... tech_2 through _7 omitted for brevity
tech_8 = 65536,
fire_1 = 131072,
//... fire_2 through _11 omitted for brevity
fire_12 = 268435456,
Key = 536870912,
Exit = 1073741824,
Gas = 2147483648, // Cannot convert source type uint to target type int
}
अंतिम आइटम के लिए मूल्य प्रतीत होता है बहुत बड़ी होने के लिए । क्या किसी ने इससे पहले निपटाया है? कोई विचार यह कैसे हल किया जा सकता है/काम किया जा सकता है?
एक loooong enum .. –