I have an enum type that comes from a byte. In my shared library at some point there is a set of enum parameters for int. The problem is that the byte received byte received this method is used in the shared library, casting to int fails and throws an exception.
Is there a way to print an enum base class check so that I can do an int set only for int enum?
Here are two examples of enumerations:
enum DaysByte : byte { Sat = 1, Sun, Mon, Tue, Wed, Thu, Fri }; enum DaysInt : int { Sat = 1, Sun, Mon, Tue, Wed, Thu, Fri };
source share