摘要: int [] array = new int[]{69,3,52,87,32,14,66,1,89}; int temp = 0 ; for (int i = 0 ; i < array.Length - 1 ; i++) { for (int j = i + 1 ; j < array.Lengt 阅读全文
posted @ 2018-11-10 17:51 冬夜的火 阅读(91) 评论(0) 推荐(0) 编辑
摘要: Using System.Windows.Forms; foreach(Control control in this.Controls) { //as运算符是把一个类型转换为另一类型如果不成功返回null is运算符是来判断一个对象是不是一种类型,如果是返回true如果不是返回false; if 阅读全文
posted @ 2018-11-10 17:47 冬夜的火 阅读(430) 评论(0) 推荐(0) 编辑
摘要: Server.Transfer(“要去的页面”); Response.Redirect(“要去的页面”); 阅读全文
posted @ 2018-11-10 17:46 冬夜的火 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 1. override 重写 使用 override 修饰符来修改方法、属性、索引器或事件。重写方法提供从基类继承的成员的新实现。基类中用virtual关键字声明的方法的方法称为虚方法,子类中相应的重写方法要和基类中的虚方法具有相同的签名。 不能重写非虚方法或静态方法。被重写的基类的方法必须是虚拟的 阅读全文
posted @ 2018-11-10 17:43 冬夜的火 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 委托是返回类型和参数列表相同的一组方法的代理,它是一种类类型 委托可以把一个(组)方法作为参数传入另一个方法。 【委托可以理解为指向一个函数的引用(C++函数指针)。】 事件是一种特殊的委托 ,它使得由事件修饰的委托在定义事件的类的外部只能出现在+=和-=的左边,也就是不能够被在定义事件的类的外部进 阅读全文
posted @ 2018-11-10 17:43 冬夜的火 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1 public class MainClass 2 { 3 public static void Main() 4 { 5 Console.WriteLine(Foo(30)); 6 } 7 public static int Foo(int i) 8 { 9 if (i 0 && i <= 2) 12 return 1; 13 el... 阅读全文
posted @ 2018-11-10 17:42 冬夜的火 阅读(655) 评论(0) 推荐(0) 编辑
摘要: 1.使用QueryString(查询字符串), 如....?id=1; (Response.Redirect("Default2.aspx?pId=f"); string pId = Request.QueryString["pId"]; ) 2.使用Session变量(称为会话变量是服务器端的一个 阅读全文
posted @ 2018-11-10 17:40 冬夜的火 阅读(193) 评论(0) 推荐(0) 编辑
摘要: private(不能修饰类) : 私有成员, 在类的内部才可以访问。 protected (不能修饰类): 保护成员,该类内部和继承类中可以访问。 public : 公共成员,完全公开,没有访问限制。 internal: 在同一程序集内可以访问,一般情况下指的就是是同一项目内。 protected 阅读全文
posted @ 2018-11-10 17:40 冬夜的火 阅读(389) 评论(0) 推荐(0) 编辑
摘要: Request(Request.Url是访问请求的http网址等)、Response、Server(可以说是一个实用工具对象,它是HttpServerUtility类型的个对象。比如一些编码反编码的方法,) 阅读全文
posted @ 2018-11-10 17:39 冬夜的火 阅读(224) 评论(0) 推荐(0) 编辑
摘要: localhost=127.0.0.1 是本机回环IP,基本上是开发在一台机上模拟外网。 阅读全文
posted @ 2018-11-10 17:38 冬夜的火 阅读(375) 评论(0) 推荐(0) 编辑