随笔分类 - C#
C#
摘要:大批量数据Excel 比如数据量一大(比如上万条以上的记录),用传统的方式和插件等导出excel速度都很慢,甚至最终导致内存益出;往文本文件直接插入记录的方式(速度快,占内存也少),然后用\t割开代表一列,产生的文件,直接用excel打开就可以,单只支持单个sheet页,office2003(xls
阅读全文
摘要:C# SQL Server: ROUND函数为四舍五入
阅读全文
摘要:多类型匿名对象 var result = new { pages = 10, users = new System.Collections.ArrayList { new{id=1,name="2"}, new{id=2,name="3"} } }; result.users.Add(new { i
阅读全文
摘要:DLL文件下载 示例: 操作类: 经典示例: 其它实例:
阅读全文
摘要:/*Word、Excel先保存再输出-下载*/ strReportFilePath = Server.MapPath("~") + strReportFilePath; doc.Save(strReportFilePath); if (!string.IsNullOrEmpty(strReportF
阅读全文
摘要:C#创建Windows Service(Windows 服务)基础教程 C#winform windows服务程序创建与安装 C#实现WinForm随WINDOWS服务一起启动
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window...
阅读全文
摘要:using System;using System.Collections.Generic;using System.IO;using System.Text;using System.Net;using System.Web;namespace Deerchao.Utility{ publi...
阅读全文
摘要:一、try { //方法一 //调用自己的exe传递参数 //Process proc = new Process(); //proc.StartInfo.FileName = @"D:\\hote...
阅读全文
摘要:c#操作word模板插入文字、图片及表格1.建立word模板文件person.dot用书签标示相关字段的填充位置2.建立web应用程序加入Microsoft.Office.Interop.Word引用具体添加引用请参看http://www.microsoft.com/china/msdn/library/office/office/OfficePrIntopAssFAQ.mspx?mfr=true3.相关示例代码protected void CreateReport_Click(object sender, EventArgs e) { Microsoft....
阅读全文
摘要:Config.ini 文件操作[SYS]sysname=hycompany=hyhytel=2using System;using System.Collections.Generic;using System.Text;namespace Common{ public class SetIN...
阅读全文
摘要:XML解析序列化2 根据IP获取城市--有道接口 config.xml /// <summary> /// 实体转Xml,Xml转实体类 /// </summary> /// <typeparam name="T"></typeparam> public class XmlHelper<T> whe
阅读全文
摘要:/// /// 身份证号码验证,返回字符数组:0:身份证号码,1:出生日期,2:性别[true:女,false:男],如果为空null:身份证错误 /// /// 身份证号码 /// 字符数组:0:身份证号码,1:出生日期,2:性别[t...
阅读全文
posted @ 2014-03-19 08:55
hy31337


浙公网安备 33010602011771号