/// 布尔类型转换为整型 public static int Bool2Int(object obj) { if(Convert.ToBoolean(obj)==true) return 1; else return 0; }