国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

【轉載】#457 Converting Between enums and their Underlying Type

2019-11-17 03:16:38
字體:
來源:轉載
供稿:網友

【轉載】#457 Converting Between enums and their Underlying Type

When you declare an enum, by default each enumerated value is rePResented internally with an int. (System.Int32 - 4 bytes). You can convert between values of the underlying type and enum values using an explicit cast. Because an enum is represented by an int by default, you can convert between integers and enum values.

1 Mood m = (Mood)2;2 Console.WriteLine(m);    // Petulant3 4 m = Mood.Crabby;5 int i = (int)m;6 Console.WriteLine(i);    // 0

原文地址:#457 Converting Between enums and their Underlying Type


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 枝江市| 竹溪县| 台江县| 苍溪县| 河西区| 尼勒克县| 天门市| 洮南市| 安陆市| 昔阳县| 得荣县| 宜兰市| 渭南市| 屏山县| 会东县| 肃宁县| 外汇| 石阡县| 台山市| 嘉荫县| 苍南县| 平塘县| 砀山县| 庆城县| 宁武县| 乐至县| 天津市| 永济市| 五寨县| 平谷区| 通辽市| 大化| 剑河县| 青州市| 清流县| 苏州市| 贵港市| 伊吾县| 叶城县| 香港| 昭通市|