Connector/NET exposes a public enum MySqlErrorCode that provides enum values for many of the errors documented here.
Some clients might be using these enum values to determine how to respond to a MySqlException (by testing the .Number property), e.g., here, here, here.