摘要: public enum color{ red = 0, blue = 1}color c1;转换成字符串:Enum.GetName(typeof(color), c1) 转换成枚举:(color)Enum.Parse(typeof(color), "red", true) private SqlDbType getType(string s) { return (SqlDbType)Enum.Parse(typeof(SqlDbType), s, true); }转帖地址:http://hi.baidu.com/redlineren/item/bada29fa3446f2c 阅读全文
posted @ 2012-08-31 19:29 ManchesterUnited 阅读(265) 评论(0) 推荐(0) 编辑