N
nomad
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.ImmobiliserMake != ImmobiliserMake.None ||
risk.Vehicle.ImmobiliserMake != ImmobiliserMake.NA)
Although the risk.Vehicle.ImmobiliserMake 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.ImmobiliserMake != ImmobiliserMake.None ||
risk.Vehicle.ImmobiliserMake != ImmobiliserMake.NA)
Although the risk.Vehicle.ImmobiliserMake is equal to None, it still
gioes into my if block. Any ideas where I am going wrong?
Appreciate the help.