2012年11月28日

以前一直以为用代码读写文本文件的数据很麻烦,其实都是自己心里作用,认为stream很神秘,其实只要自己深入研究一下也就那么几行代码。其实就是两个对象,StreamReader和StreamWriter,代码如下:View Code 1publicstaticvoidMain(string[]args)2{3stringFileName="测试.xls";4if(!File.Exists(FileName))5{6FileStreamf=File.Create(FileName);7stringFileContentText="<table><tr
posted @ 2012-11-28 14:21 天子门生 阅读(95) 评论(0) 推荐(0)

2011年6月2日

摘要: 这一段学习了JS的面向对象编程,感觉很是受用,以前总感觉JS编程很麻烦,需要记住很多东西,现在感觉很是有意思,但是在JS写类的时候注意几点有:1、在类中不能有多个引用,那样的话JS是不能得到值的,例如: function DivObj(ID){ //得到Div对象 this.ObjElement=document.getElementById(ID); //把当前的外联样式等赋值给界面Style this.GetStyle=function(){ this.Style=this.NewStyle; }; //界面样式 this.Style=this.ObjElement.style //外联样 阅读全文
posted @ 2011-06-02 12:35 天子门生 阅读(718) 评论(0) 推荐(0)

2010年2月22日

摘要: DataTable添加新列为//列的实例DataColumn NewColumn = new DataColumn();//得到列的类型 NewColumn.DataType = System.Type.GetType("System.Decimal"); NewColumn.ColumnName = "人均能耗"; for (int i = 0; i < table.Rows.Count;... 阅读全文
posted @ 2010-02-22 18:02 天子门生 阅读(259) 评论(0) 推荐(0)
 
点击右上角即可分享
微信分享提示