Hi,
I have an enum which obviously has several values. I want to be able
to do a comparison to see if the value selected by a user is the same
as one of the enums in the list. My code is below.
if (risk.Vehicle.I mmobiliserMake != ImmobiliserMake .None ||
risk.Vehicle.Im mobiliserMake != ImmobiliserMake .NA)
Although the risk.Vehicle.Im mobiliserMake is equal to None, it still
gioes into my if block. Any ideas where I am going wrong?
Appreciate the help.
I have an enum which obviously has several values. I want to be able
to do a comparison to see if the value selected by a user is the same
as one of the enums in the list. My code is below.
if (risk.Vehicle.I mmobiliserMake != ImmobiliserMake .None ||
risk.Vehicle.Im mobiliserMake != ImmobiliserMake .NA)
Although the risk.Vehicle.Im mobiliserMake is equal to None, it still
gioes into my if block. Any ideas where I am going wrong?
Appreciate the help.
Comment