11 2012 档案
摘要:private bool StreamExport(string fileName) { if (fileName == string.Empty) { return false; } StringBuilder content = new StringBuilder(); content.Append("<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http:/
阅读全文
摘要:linqint[]a={0,1,2,1,4};int[]result=a.Distinct().ToArray();int[]a={0,1,2,1,4}; List<int>temp=newList<int>(); foreach(intiina) { if(temp.Contains(i))continue; temp.Add(i); } int[]result=temp.ToArray();
阅读全文
摘要:XML/HTML code?123456789101112131415161718192021222324252627282930313233343536<htmlxmlns="http://www.w3.org/1999/xhtml"> <headrunat="server"> <title>无标题页</title> <scripttype="text/javascript"src="js/jquery-1.3.2.min.js"></script
阅读全文
摘要:引用using iTextSharp.text;using iTextSharp.text.pdf;using iTextSharp;using System.IO;using System.Drawing; //Document:(文档)生成pdf必备的一个对象,生成一个Document示例 Document document = new Document(PageSize.A4, 30, 30, 5, 5); //为该Document创建一个Writer实例: PdfWriter.GetInstance(document, new FileStream("Chap0101.pdf
阅读全文
摘要:需要添加的命名空间: using System.Xml; 定义几个公共对象: XmlDocument xmldoc ; XmlNode xmlnode ; XmlElement xmlelem ; 1,创建到服务器 同名目录下的xml文件: 方法一: xmldoc = new XmlDocument ( ) ; //加入XML的声明段落 xmlnode = xmldoc.CreateNode ( XmlNodeType.XmlDeclaration , "" , "" ) ; xmldoc.AppendChild ( xmlnode ) ; //加入一个
阅读全文
摘要:voidMain(){DataTabledt=newDataTable();dt.Columns.Add("flightno");dt.Columns.Add("flightTime",typeof(DateTime));dt.Columns.Add("arrivalTime",typeof(DateTime));dt.Columns.Add("passenger");dt.Rows.Add("AU123",Convert.ToDateTime("2010-12-2012:30&quo
阅读全文