随笔分类 -  C#

JSON序列化和反序列化
摘要:using System;using System.Collections.Generic;using System.Web;using System.Runtime.Serialization;using System.IO;using System.Runtime.Serialization.J... 阅读全文
posted @ 2014-05-14 17:51 Kelly_HanShuai 阅读(166) 评论(0) 推荐(0)
SqlBulkCopy高效插入数据
摘要:/// ///使用SqlBulkCopy方式插入数据 /// /// privatestaticlongSqlBulkCopyInsert() { Stopwatchstopwatch=newStopwatch(); stopwatch.Start(); DataTabledataTable=GetTableSchema(); for(inti=0;i<count;i++) { DataRowdataRow=dataTable.NewRow(); dataRow[2]=Guid.NewGuid(); dataTable.Rows.Add(dataRow); } //Console.Wri 阅读全文
posted @ 2013-08-23 09:41 Kelly_HanShuai 阅读(251) 评论(0) 推荐(0)