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 this block
}
becuase i think this would not work
if (pp == (PrescriptionTypePrint.PrescriptionOnly | PrescriptionTypePrint.Both))
{
//execute this block
}
// the goal of this if pp has a value of prescription or both it will execute.
thank you so much for the some one who shed me some light