bool转换为int的简单方法(CheckBox选中则返回1否则返回0)

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

posted on 2006-10-28 10:23  散步的蠕虫  阅读(2193)  评论(0编辑  收藏  举报

导航