WCF多个协定实现

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.ServiceModel;using System.ServiceModel.Description;namespace WcfDemo …… 阅读全文

WCF数据协定

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.ServiceModel;using System.ServiceModel.Description;using System.Runti …… 阅读全文

C#中Task任务和Async、Await异步非阻塞方式

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;namespace TaskSample{ class Program { stat …… 阅读全文

C#中HttpWebRequest性能问题

用到HttpWebRequest的地方,都应该紧跟一句httpWebRequest.ServicePoint.ConnectionLimit= int.Max;.net 的 HttpWebRequest 或者 WebClient 在多线程情况下存在并发连接限制,这个限制在桌面操作系统如 windows xp , windows 7 下默认是2,在服务器操作系统上默认为10. 如果不 …… 阅读全文

c#中queue队列用法

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace QueueSample{ class Program { static void Main(string[] a …… 阅读全文

C#中错误日志记录方法,信息比较详细易定位

namespace Sample3{ class Program { static void Main(string[] args) { try { int i = Convert.ToInt32("a"); } catc …… 阅读全文

C#反射动态调用dll中的方法及使用QuartZ.net实现作业调度

using Quartz;using Quartz.Impl;using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Text;using System.Threading;using System.Threading.Tasks;n …… 阅读全文

HangFire任务调度实例(Console和MVC中)及Log4Net日志配置

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Hangfire{ class Program { private static readonly log4ne …… 阅读全文