摘要: View Code 对于强制转换,先举几个例字说明:1、long longType = 100;int intType = longType;// 错误,需要使用显式强制转换int intType = (int)longType;//正确,使用了显式强制转换2、string stringType = "12345";int intType = (int)stringType;//错误,string类型不能直接转换为int类型int intType = Int32.Parse(stringType);//正确3、long longType = 100;string strin 阅读全文
posted @ 2011-04-27 20:10 .net万剑 阅读(793) 评论(0) 推荐(0) 编辑