正则获取字符串中两个字符串间的内容
摘要:/// <summary> /// 正则获取字符串中两个字符串间的内容 /// </summary> /// <param name="str"></param> /// <param name="s"></param> /// <param name="e"></param> /// <retur
阅读全文
posted @
2016-04-13 08:51
wolf12
阅读(1764)
推荐(0)
string.join加引号
摘要:columnsGen = string.Join(",", modelDictionary.Keys); valueGen = modelDictionary.Values.Aggregate(valueGen, (current, i) => current + ("'" + i + "',"))
阅读全文
posted @
2016-01-06 18:10
wolf12
阅读(2300)
推荐(0)
用于dbnull的数据转换。因为用convert.to无法转换dbnull类型
摘要:/// <summary> /// add by wolf /// </summary> public static class ExtendObject { public static bool IsTargetType<T>(this object source) where T : IConv
阅读全文
posted @
2015-07-31 08:50
wolf12
阅读(439)
推荐(0)
sqldbhelper
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Configuration;using System.
阅读全文
posted @
2015-07-31 08:41
wolf12
阅读(217)
推荐(0)
async await
摘要:public static Task<double> GetValueAsync(double num1, double num2) { return Task.Run(() => { Console.WriteLine(AppDomain.GetCurrentThreadId()); for (i
阅读全文
posted @
2015-04-24 00:01
wolf12
阅读(132)
推荐(0)
.net多线程的发展
摘要:APM和EAP是在async/await之前的两种不同的异步编程模式。 APM如果不阻塞主线程,那么完成通知(回调)就会执行在另外一个线程中,从而给我们更新UI带来一定的问题。 EAP的通知事件是在主线程中执行的,不会存在UI交互的问题。 最后,我们还学习了在Winform下不同线程之间交互的问题,
阅读全文
posted @
2015-04-22 00:26
wolf12
阅读(208)
推荐(0)
C#实现判断字符是否为中文
摘要:C#实现判断字符是否为中文 (2012-08-14 14:25:28) C#实现判断字符是否为中文 标签: gb2312 big5编码 gbk编码 判断 汉字 杂谈 分类: 技术 gb2312 big5编码 gbk编码 判断 汉字 杂谈 protected bool IsChineseLetter(
阅读全文
posted @
2014-11-20 13:45
wolf12
阅读(769)
推荐(0)
Interlocked.CompareExchange
摘要:class SourceManager { private SourceManager() { } private static SourceManager sourceManager; public static SourceManager Instance { get { if (sourceM
阅读全文
posted @
2014-11-03 23:15
wolf12
阅读(873)
推荐(0)
首字母变成大写
摘要:首字母变成大写 System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase("abcd");
阅读全文
posted @
2014-08-28 17:07
wolf12
阅读(143)
推荐(0)
Ihttphander获取session
摘要:实现IRequiresSessionState就OK
阅读全文
posted @
2014-08-16 14:44
wolf12
阅读(107)
推荐(0)
EntityFramework left join
摘要:var result = from u in db.Order join n in db.Equipment on u.OrderId equals n.OrderId into temp from m in temp.DefaultIfEmpty() select new { OrderID =
阅读全文
posted @
2014-06-06 17:00
wolf12
阅读(167)
推荐(0)
C# 发邮件
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u
阅读全文
posted @
2014-05-06 15:50
wolf12
阅读(224)
推荐(0)
获取datatable更新之前的数据
摘要:string dd = ds.Tables[0].Rows[0][0, DataRowVersion.Original].ToString() ;
阅读全文
posted @
2014-04-02 13:00
wolf12
阅读(351)
推荐(0)