上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 71 下一页
摘要: With test-driven development (TDD), you use unit tests to help design your code. This can be an odd concept if you are used to testing after you have finished coding, but there is a lot of sense in... 阅读全文
posted @ 2012-04-25 16:59 扯 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 本示例使用的单元测试工具为VS2010自带的单元测试工具,Mock工具为WCFMock:使用及下载地址为:http://wcfmock.codeplex.com/ WCFMock主要提供两个DLL,WCFMock和Moq,均可下载获得 WCF服务端: 需要引入:WCFMock.dll 在提供服务接口的类开头... 阅读全文
posted @ 2012-04-25 12:14 扯 阅读(1845) 评论(0) 推荐(0) 编辑
摘要: private static int dateDiff(DateTime dtStart, DateTime dtEnd) { TimeSpan tsStart = new TimeSpan(dtStart.Ticks); TimeSpan tsEnd = new TimeSpan(dtEnd.Ticks); Ti... 阅读全文
posted @ 2012-04-24 17:00 扯 阅读(11188) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/prince3245/archive/2010/03/23/1692630.htmlC#版本 #region 密钥 private static string key = "abcd1234"; ... 阅读全文
posted @ 2012-04-23 16:03 扯 阅读(4920) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 写入CSV文件 /// </summary> /// <param name="path">文件路径</param> /// <param name="dt">数据源</param> private void writeCsv(string path, DataTable dt... 阅读全文
posted @ 2012-04-23 16:00 扯 阅读(690) 评论(0) 推荐(0) 编辑
摘要: [WebInvoke(UriTemplate = "Qry?msg={xml}", Method = "POST")] public Stream SearchQry(string xml, Stream request) { WebOperationContext.Current.OutgoingResponse.ContentT... 阅读全文
posted @ 2012-04-23 15:46 扯 阅读(953) 评论(0) 推荐(0) 编辑
摘要: UTF8Encoding encoding = new UTF8Encoding(); byte[] data = encoding.GetBytes(requestDataXml.ToString()); HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url); ... 阅读全文
posted @ 2012-04-12 14:12 扯 阅读(1847) 评论(0) 推荐(0) 编辑
摘要: 通过控件名获取控件对象--this为控件所在的界面object o = this.GetType().GetField(controlName, System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Ins... 阅读全文
posted @ 2012-04-12 14:09 扯 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 思路:先将datatable转换为xml格式字符串,然后在比较xml即可DataTable dt = new DataTable();dt.TableName = "dt"; //需要设置DataTable的名称 dt.Columns.Add("ID");dt.Columns.A... 阅读全文
posted @ 2012-04-10 17:33 扯 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 1、在IIS新建网站或则虚拟目录,指向项目地址 2、用VS打开项目 3、调试--》附加进程(选择w3wp,需勾选【显示所有会话中的进程】) 阅读全文
posted @ 2012-03-28 21:08 扯 阅读(340) 评论(0) 推荐(0) 编辑
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 71 下一页