得到AppSettings中的配置Bool信息
2015-12-18 14:47
483 查看
得到AppSettings中的配置Bool信息
得到AppSettings中的配置Bool信息
用法:
得到AppSettings中的配置Bool信息
/// <summary> /// 得到AppSettings中的配置Bool信息 /// </summary> /// <param name="key"></param> /// <returns></returns> public static bool GetConfigBool(string key) { bool result = false; string cfgVal = GetConfigString(key); if(null != cfgVal && string.Empty != cfgVal) { try { result = bool.Parse(cfgVal); } catch(FormatException) { // Ignore format exceptions. } } return result; }
用法:
bool istrue=GetConfigBool("canupload")
相关文章推荐
- swift 可选值?
- Android的屏幕适配
- 安卓同样优秀看iOS后Android的进步
- Swift学习笔记 -- 枚举和结构
- 浅谈iOS开发.a静态库的打包(包括打包的文件中用到了一些别人的三方库和分类的处理)
- 得到AppSettings中的配置字符串信息
- Android Service学习之IntentService 深入分析
- Android onActivityResult获取返回值的用法
- Android ExpendableListView的使用
- 对MarshalByRefObject的讲解
- cocos2d-x 音乐/音效设置
- IOS多线程开发之线程的状态
- iOS8以后推送通知需要访问权限
- IOS开发之Core Location
- ios 重签名
- Android 菜单(OptionMenu)大全 建立你自己的菜单
- IOS setNeedsDisplay setNeedsLayout注意
- ANDROID自定义视图——onMeasure流程,MeasureSpec详解
- 使用 SDWebImage 应该在 AppDelegate 写的代码
- Android笔记:Webview 支持 input type=file选择上传图片