c# 中各种类型的常用转换方式

来源:互联网 发布:太平洋证券交易软件 编辑:程序博客网 时间:2024/04/28 08:11
数据类型.parse                    example:Int32.Parse
Convert.To数据类型            example:Convert.ToInt32
枚举类型type 和int之间的转换   强制转换 (int)type
byte[]与各种数据类型之间的转换 BitConverter.GetBytes()    BitConverter.toInt32()  

以上 Namespace:  System
0 0
原创粉丝点击