2 Topics
|
|
for example i have [System.Flags] public enum PrescriptionTypePrint { PrescriptionOnly = 1, InstructionOnly = 2, Both = PrescriptionOnly | InstructionOnly } how i could make it simplify replacing the || to | on the code below PrescriptionTypePrint pp = PrescriptionTypePrint.Both; if (pp == PrescriptionTypePrint.PrescriptionOnly || pp == PrescriptionTypePrint.Both) { //execute … |
|
What is the difference between an enum and an array? with both you can store elements the main difference between arrays and enums are that enums are not index based wereas arrays are, that is all I know. So I have a few questions 1. How do we use enums? … |
The End.