摘要: 来自MSDN官方文档:http://msdn.microsoft.com/en-us/library/system.configuration.provider.providercollection.aspx 1 using System; 2 using System.ComponentModel; 3 4 // The following example demonstrates how to create 5 // a resource class that implements the IDisposable interface 6 // and the IDisposable.... 阅读全文
posted @ 2013-07-31 11:37 MarkSun 阅读(581) 评论(0) 推荐(0) 编辑
摘要: 我们习惯了直接连到数据库上面读取数据表的数据内容;如果有一天我们需要读取CSV,EXCEL文件的内容的时候,可不可以也像读数据表的方式一样呢?当然可以,使用OleDB ADO.NET是很简单的事情 1 public static bool WriteContentToFile(FileStream fs, StringBuilder sb) 2 { 3 bool succ = false; 4 using (StreamWriter sw = new StreamWriter(fs, Encoding.Defaul... 阅读全文
posted @ 2013-07-31 11:01 MarkSun 阅读(2923) 评论(0) 推荐(0) 编辑