March 2004
Intermediate to advanced
560 pages
26h 47m
English
public enum FileAccess {
Read = 0x1,
ReadWrite = Read | Write,
Write = 0x2,
}
|
BA A large segment of our customers do not understand flag enums. Flag enums are enums whose values are meant to be combined using the bitwise OR operation. Many users would never think about using the bitwise OR operator (|) to combine values. That is why we always provide named values for the most common combinations. ReadWrite is an example of that. It is not strictly necessary, but it is much easier to discover than FileAccess.Read | FileAccess.Write. |
Read now
Unlock full access