码迷,mamicode.com
首页 >  
搜索关键字:configurationmanager    ( 293个结果
c# 邮件发送
1 2 3 4 5 6 private static readonly string _smtpServer = ConfigurationManager.AppSettings["SmtpServer"]; private static readonly string _userAccount =... ...
分类:Windows程序   时间:2018-07-25 23:57:28    阅读次数:363
C#通用数据访问类:一
1 private static string connString = ConfigurationManager.ConnectionStrings["connString"].ToString(); 2 3 /// 4 /// 执行增、删、改操作 5 /// 6 /// SQL语句 7 ... ...
分类:Windows程序   时间:2018-07-21 21:21:29    阅读次数:215
ConfigurationManager 读写AppSettings键值对
前面的示例假定您的项目有一个 App.config 文件如下所示。 前面的示例假定您的项目有一个 App.config 文件如下所示。 前面的示例假定您的项目有一个 App.config 文件如下所示。 XML <?xml version="1.0" encoding="utf-8" ?> <con ...
分类:移动开发   时间:2018-07-18 17:10:23    阅读次数:309
C#实现ftp上传和下载
第二步:帮助类FtpHelper如下: public class FtpHelper { public static string _host = ConfigurationManager.AppSettings["FtpUrl"]; public static string _userId = C ...
分类:Windows程序   时间:2018-07-14 13:05:13    阅读次数:307
c#中对批量新增数据中使用SqlBulkCopy
private void AddBulkInsert(string tableName, DataTable dt) { string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["Xz ...
分类:数据库   时间:2018-06-22 13:19:45    阅读次数:169
ConfigurationManager.AppSettings方法
一 配置文件概述: 应用程序配置文件是标准的 XML 文件,XML 标记和属性是区分大小写的。它是可以按需要更改的,开发人员可以使用配置文件来更改设置,而不必重编译应用程序。配置文件的根节点是configuration。我们经常访问的是appSettings,它是由.Net预定义的配置节。我们经常使 ...
分类:移动开发   时间:2018-06-15 13:10:13    阅读次数:272
获取webconfig配置文件内容
string ServerUrl= ConfigurationManager.AppSettings["ServerUrl"].ToString(); web.config中的配置为:<configuration><appSettings> <add key="ServerUrl" value="h ...
分类:Web程序   时间:2018-06-14 20:51:35    阅读次数:179
dapper Oracle
public class DapperFactory { public static readonly string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["Wip_TestCon ...
分类:移动开发   时间:2018-06-07 17:03:54    阅读次数:268
C# ConfigurationManager不存在问题解决
在做串口通信的时候,需要使用"ConfigurationManager"类,但是添加"Using System.Configuration"命名空间后编译器依旧报错,总是显示"ConfigurationManager"不存在,但是发现"ConfigurationSettings"可以使用,但是在MS ...
分类:Windows程序   时间:2018-06-04 14:03:10    阅读次数:224
HTTP 请求,POST方式,把一个对象序列化成JSON样式作为参数访问服务器
publicstaticstringLogin(Loginlogin){HttpWebRequestrequest;WebResponseresponse;stringremoteAddress=ConfigurationManager.AppSettings["remoteAddress"];stringLoginServiceName=ConfigurationManage
分类:Web程序   时间:2018-06-04 11:53:42    阅读次数:196
293条   上一页 1 2 3 4 5 6 ... 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!