An enumeration can have any value based on its base type (Int32 in your case).
EnumLogicalOperator op = (EnumLogicalOperator) 0;
EnumLogicalOperator op = (EnumLogicalOperator) 100;
EnumLogicalOperator op = (EnumLogicalOperator) 900000;
EnumLogicalOperator op = (EnumLogicalOperator) -1;
private EnumLogicalOperator _op; // As a class member, will default to 0
Be sure to use Enum.IsDefined when checking your input conditions and error handling. It is also usually a good idea to include 0 as the value for one of your enum values.
source
share