src/Bro.Common.Model/Helper/StaticHelper.cs
@@ -250,5 +250,23 @@ collection.Move(collection.IndexOf(sortedList[i]), i); } } // 布尔类型转换为整型 public static int ToInt(this object obj) { if (Convert.ToBoolean(obj) == true) return 1; else return 0; } // 整型转换为布尔类型 public static bool ToBool(this object obj) { if (Convert.ToInt32(obj) == 1) return true; else return false; } } }