Can enum have int values?

Since Enums can be any integral type ( byte , int , short , etc.) , a more robust way to get the underlying integral value of the enum would be to make use of the GetTypeCode method in conjunction with the Convert class: enum Sides { Left, Right, Top, Bottom } Sides side = Sides.

Sizin İçin Seçtik  What can be in enum?

Leave a Reply

Your email address will not be published. Required fields are marked *