2012年9月23日
摘要: 生么是委托???? 委托类似于函数指针,但函数指针只能引用静态方法,而委托既能引用静态方法,也能引用实例方法。 委托使用分三步:1、委托声明。2、委托实例化。3、委托调用。请看代码: delegate int NumOpe(int a,int b); //第一步,声明委托 class Class1 { static void Main(string... 阅读全文
posted @ 2012-09-23 23:05 163com 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 需要添加的命名空间:using System.Xml; 定义几个公共对象:XmlDocument xmldoc ;XmlNode xmlnode ;XmlElement xmlelem ; 1,创建到服务器同名目录下的xml文件: 方法一:xmldoc = new XmlDocument ( ) ;//加入XML的声明段落,XmlDeclaration xmldecl; xmldecl = xml... 阅读全文
posted @ 2012-09-23 23:01 163com 阅读(93) 评论(0) 推荐(0) 编辑
摘要: C#简单操作XML的基本概念 using System.Xml;//初始化一个xml实例XmlDocument xml=new XmlDocument(); //导入指定xml文件xml.Load(path);xml.Load(HttpContext.Current.Server.MapPath("~/file/bookstore.xml")); //指定一个节点XmlNode root=xml.... 阅读全文
posted @ 2012-09-23 22:59 163com 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 简短的一段代码,可以判断webbrowser中打开的网页中是否含有某段字符串。这段代码比较有用,可以利用两个网页的不同之处来分辨出网页是否跳转到了需要的网页。 代码如下:转载请注明出处: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.D... 阅读全文
posted @ 2012-09-23 22:47 163com 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 下面是我做的一段批量注册163邮箱的代码,经测试是有效的能够批量注册邮箱,可以换成其他的。欢迎大家 欣赏啊,请不要用于不正当的途径。 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;us... 阅读全文
posted @ 2012-09-23 22:41 163com 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 我们做一些软件的时候常常要用到换IP的操作,其实简单的换IP的方法就是重新拨号啊,下面就是我实践成功的重新拨号的代码,很简单的,是一个单独的类。 using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;//诊断,调用进程 namespace ... 阅读全文
posted @ 2012-09-23 15:47 163com 阅读(229) 评论(0) 推荐(0) 编辑