国产探花免费观看_亚洲丰满少妇自慰呻吟_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


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 南充市| 桃源县| 兴宁市| 芦溪县| 天门市| 长武县| 望谟县| 阆中市| 海盐县| 罗平县| 平山县| 错那县| 南川市| 雅江县| 甘德县| 会理县| 海门市| 宜春市| 容城县| 云龙县| 福鼎市| 长岭县| 桑植县| 武威市| 彭州市| 大港区| 舞钢市| 平凉市| 武清区| 巴彦县| 房产| 客服| 汉阴县| 巧家县| 鲁山县| 丹寨县| 青河县| 囊谦县| 玛纳斯县| 通江县| 桐柏县|