Use Enum.IsDefined()
first, to save yourself from wrapping in a try/catch. It will return a boolean value of whether or not the input is a valid member of that enum.
Use Enum.IsDefined()
first, to save yourself from wrapping in a try/catch. It will return a boolean value of whether or not the input is a valid member of that enum.