随笔分类 - C#
c#
摘要:原文出处:http://www.cnblogs.com/shanyou/archive/2012/09/07/2676026.html
阅读全文
摘要:SQL Server Connection Pooling (ADO.NET)Connecting to a database server typically consists of several time-consuming steps. A physical channel such as ...
阅读全文
摘要:ADO.NET Connection Pooling at a GlanceEstablishing a connection with a database server is a hefty and high resource consuming process. If any applicat...
阅读全文
摘要:log4net配置://Author:GaoBingBing[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]必备的组件: 1.log4net.dll ...
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Data.SqlClient; 4 using System.Data; 5 using System.Configuration; 6 using S...
阅读全文
摘要:1 //辅助查询 Author:高兵兵 2 public class QueryHelp 3 { 4 #region IList ToList(string cmdText,string connString) where T : new() 5 /// 6 ...
阅读全文
摘要:1 public class AppSettingManager 2 { 3 public static bool Update(string key, string value) 4 { 5 6 try 7 ...
阅读全文
摘要:1 #region 根据对象名成创建对象 2 /// 3 /// 根据对象名成创建对象 4 /// 5 /// 程序集名称 6 /// 类全称,包括命名空间 7 /// 对象的实例 8 ...
阅读全文
摘要:RichTextBox内容模型RichTextBox支持基于块的内容模型。RichTextBox 的内容属性为 Blocks,这是 Paragraph 元素的集合Paragraph元素可包含从 Inline 派生的元素。上图总结了 RichTextBox 的内容模型,并且显示从 Block 和 In...
阅读全文
摘要:之前做WPF遇到问题,在网上找到的一个类 1 public class PopupNonTopmost : System.Windows.Controls.Primitives.Popup 2 { 3 public static DependencyProperty ...
阅读全文
摘要:名称说明1.Close在派生类中被重写时,释放由当前 WaitHandle 持有的所有资源。 (继承自 WaitHandle。)在XNA Framework中,此成员由 Close() 重写。2.CreateObjRef创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。 (...
阅读全文
摘要:1 using System; 2 using System.Threading; 3 4 public class Example 5 { 6 // mre is used to block and release threads manually. It is 7 ...
阅读全文
摘要:在定义泛型类时,可以对客户端代码能够在实例化类时用于类型参数的类型种类施加限制。如果客户端代码尝试使用某个约束所不允许的类型来实例化类,则会产生编译时错误。这些限制称为约束。约束是使用 where 上下文关键字指定的。下表列出了六种类型的约束: 约束 说明T:结构类型参数必须是值类型。可以指定除 N...
阅读全文
摘要:1.NuGet获取Ninject.dll选中项目右键:.NET技术交流群 199281001 .欢迎加入。2.全局注册 Global.asax.cs1 //注册Ninject依赖注入全局解析器2 GlobalConfiguration.Configuration.DependencyResolve...
阅读全文
摘要:1 public sealed class SocketData 2 { 3 private SocketData() 4 { 5 } 6 7 public static SendFileMode SendFile(...
阅读全文
摘要:1 long g = 1024 * 1024 * 1024; 2 long m = 1024 * 1024; 3 long k = 1024; 4 if (size = 1) 5 ...
阅读全文
摘要:1 //int a = -2; 2 //this.BringToFront(); 3 //for (int i = 0; i = -radius; j--)53 {54 ...
阅读全文
摘要:/*进度条框*/.shangchuantishikuang { border: 7px solid #74A5BF; background-color: white; font-size: 14px; color: #666666; font-family: 'Micr...
阅读全文
摘要://定义数组 var _arrays = []; for (var i = 0; i < 10; i++) { _arrays.push(i); }//post $.post(href, {list: _arrays} );//get post datasv...
阅读全文
摘要:原文地址: http://kb.cnblogs.com/page/101437/
阅读全文