Enum inheriting from int

前端 未结 9 1291
借酒劲吻你
借酒劲吻你 2020-12-17 08:43

I\'ve found this all over the place in this code:

public enum Blah: int
{
    blah = 0,
    blahblah = 1
}

Why would it need to inherit fro

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 09:02

    it gives it a numeric value, that is all, as far as i know

提交回复
热议问题