An enumeration in C # is used to provide names for some known values, but ANY integer value is allowed in this enumeration, regardless of whether it has a named equivalent or not.
In your example, you did not specify a null value, but your status variable is initialized to zero. I suspect that it has not changed from this initial value at the moment you read it. Therefore, this string representation is also 0, and you parse zero when parsing it.
source share