What is the point of having
enum SomeEnum : byte // <----
{
SomeValue = 0x01,
...
}
when you have to make a cast just to assign it t
Apart from the technical reasons why... There is a design principle here.
specifying the enum as having byte storage is an implementation detail. Using the enum is a different issue, you should not have to know or care about the implementation details of it.
In client code, the fact that you are using an enum should mean that you are in fact meaning to use an enum, not a byte, or long etc. Otherwise why not just use the datatype you mean.
Strongly type languaged such as C# strive to make it just a little harder to step outside your coding "contracts" this usually helps make app design just that little bit better.
Now of course I am not saying that there are not times that you have to get involved in implementation details, a good example is in say an object relational mapper (ORM) where you are mapping a C# datatype to a database datatype, enums are a good example where you have to then know its storage type to map it. But in these cases, its IMO good to have to explicity cast or reflect, its a good flag in reviews that here you are specifically stepping outside the usual usage.