码迷,mamicode.com
首页 >  
搜索关键字:configurationmanager    ( 293个结果
c#帮助类:发送邮件
1 private static string IsOpenSendMail = ConfigurationManager.AppSettings["IsOpenSendMail"]; //是否启用异常消息发送邮箱功能 2 private static string SendUser=Configu... ...
分类:Windows程序   时间:2019-01-04 23:08:50    阅读次数:183
.net core读取json格式的配置文件
在.Net Framework中,配置文件一般采用的是XML格式的,.NET Framework提供了专门的ConfigurationManager来读取配置文件的内容,.net core中推荐使用json格式的配置文件,那么在.net core中该如何读取json文件呢? 1、在Startup类中 ...
分类:Web程序   时间:2018-12-26 00:34:49    阅读次数:203
如何修改Web.Config里面的值
0、先添加 <add key="MAXNUM" value="6" /> 1、读取值 string maxNum = ConfigurationManager.AppSettings["MAXNUM"]; 2、保存值 Configuration config = System.Web.Configu ...
分类:Web程序   时间:2018-12-19 21:02:42    阅读次数:162
签到时间
当前时间: qiandao方法: public int qiandao(string time) { //获取规定上班的时间 string times = ConfigurationManager.AppSettings["up"].ToString(); if (DateTime.Parse(t.... ...
分类:其他好文   时间:2018-11-22 20:59:33    阅读次数:217
dapper 最简单操作示例
static string dataConnection = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString; static IDbConnection connection = new MyS... ...
分类:移动开发   时间:2018-10-19 20:16:56    阅读次数:195
数据库连接-引用配置文件
using System.Configuration; string constr = ConfigurationManager.ConnectionStrings["SQLConnString"].ConnectionString; string constr = "Server=127.0.0. ...
分类:数据库   时间:2018-10-03 22:14:21    阅读次数:150
连接_配置文件
public frm_Connection() { InitializeComponent(); this.StartPosition = FormStartPosition.CenterScreen; //本窗体启动位置设为屏幕中央; if (ConfigurationManager.Connec ...
分类:其他好文   时间:2018-09-27 01:40:38    阅读次数:147
C#读写config配置文件
class Config { static Configuration _config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); private Config() { } s... ...
分类:Windows程序   时间:2018-09-19 13:31:43    阅读次数:184
.NET Core开发日志——配置
熟悉ASP.NET的开发者一定对web.config文件不陌生。在ASP.NET环境中,要想添加配置参数,一般也都会在此文件中操作。其中最常用的莫过于AppSettings与ConnectionStrings两项。而要在代码中获得文件中的配置信息,ConfigurationManager则是必不可少 ...
分类:Web程序   时间:2018-08-05 11:57:00    阅读次数:217
bll
string str = ConfigurationManager.AppSettings["DBName"].ToString(); public Studal ss() { Assembly ass = Assembly.Load("Studal"); Studal t = (Studal)as ...
分类:其他好文   时间:2018-07-30 11:17:27    阅读次数:222
293条   上一页 1 2 3 4 5 ... 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!