随笔分类 -  C#

C#方面的资料积累
摘要:aspx.net 页面下文件下载功能函数整理fullFilename 要下载的文件的路径+文件名代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1publicvoidFileDownLoadDel(stringfullFilename)2{3Sys... 阅读全文
posted @ 2010-04-03 15:13 地、 阅读(384) 评论(1) 推荐(0)
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--privateDataTablegetDataTable(stringfilePath,stringfileName){DataTabledt=newDataTable();stringstrCon... 阅读全文
posted @ 2010-03-20 15:32 地、 阅读(428) 评论(0) 推荐(0)
摘要:在Global.asax启动一条线程就ok了,下面是启动线程定时写文件的例子 Global.asax C# code [代码]很不错的网盘(http://ww618.com/-旺旺618 祝博友们每天旺,每天发。-_-) 阅读全文
posted @ 2009-11-26 12:02 地、 阅读(698) 评论(0) 推荐(0)
摘要:DriveInfo[] allDrive = DriveInfo.GetDrives();//获取一个DriveInfo对象数组,代表当前计算机的所有逻辑分区 foreach (DriveInfo item in allDrive) { if (item.IsReady)//验证磁盘空间是否可读,一免不可读的异常。 { if (item.Name.ToUpper().ToString() == "... 阅读全文
posted @ 2009-11-20 10:13 地、 阅读(346) 评论(0) 推荐(0)
摘要:XmlDocument doc = new XmlDocument();//创建出头XmlNode Declarenode=doc.CreateNode(XmlNodeType.XmlDeclaration, "", "");doc.AppendChild(Declarenode);  XmlElement BookStareelement=doc.CreateElement("BookStore... 阅读全文
posted @ 2009-11-17 20:47 地、 阅读(174) 评论(0) 推荐(0)
摘要:public void showScript(string pMessage) { this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language = javascript>alert('" + pMessage + "')</script>"); //脚本 Type cstype ... 阅读全文
posted @ 2009-11-11 16:05 地、 阅读(388) 评论(0) 推荐(0)
摘要:System.String 引用类型基本成员:Length返回字符串的长度。Contains() 判断当前字符串对象是否包含一个指定的字符串对象。Insert() 用来接收新插入字符串数据后的当前的字符串的副本。(string的“副本“特点)Remove()/Replace() 接收一个带有修改(被删除或替换的字符)了的字符串的副本。Substring() 返回当前字符串的... 阅读全文
posted @ 2009-04-05 18:46 地、 阅读(625) 评论(0) 推荐(0)