摘要: 作用:帮助我们初始化对像(给对像的每个属性依次的赋值)构造函数是一个特殊的方法1、构造函数没有返回值,连void也不能写2、构造函数名称要和类名一样3、创建对像时会执行构造函数4、构造函数可以重载类中默认有一个构造函数(隐藏的),如果你创建了一个构造函数,不管是有参数的,还是无参数的,他默认的那个无... 阅读全文
posted @ 2015-05-10 22:13 自由无风 阅读(4202) 评论(0) 推荐(1) 编辑
摘要: students 类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ClassLibrary1{ p... 阅读全文
posted @ 2015-05-10 22:00 自由无风 阅读(200) 评论(0) 推荐(0) 编辑
摘要: static静态类与非静态类的区别1、在非静态类中可以有实例成员也可以有静态成员2、在调用的时候需要使用对像名.实例成员调用(先要实例化,如person ps=new person(); ps.janzhi;) 在调用静态成员的时候,需要使用类名.静态成员名person.jianzhi() int... 阅读全文
posted @ 2015-05-10 21:17 自由无风 阅读(345) 评论(0) 推荐(0) 编辑
摘要: person类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ClassLibrary1{ clas... 阅读全文
posted @ 2015-05-10 18:20 自由无风 阅读(2134) 评论(0) 推荐(0) 编辑
摘要: Preson类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ClassLibrary1{ clas... 阅读全文
posted @ 2015-05-10 17:14 自由无风 阅读(543) 评论(0) 推荐(0) 编辑
摘要: 方法的重载参数不同,个数可以相同参数相同,个数不能相同 static void Main(string[] arr) { Console.WriteLine(M(2,3)); Console.ReadKey(); ... 阅读全文
posted @ 2015-05-10 15:59 自由无风 阅读(394) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] arr) { int[] shuZi; bool bj = false; while (!bj) { ... 阅读全文
posted @ 2015-05-10 15:54 自由无风 阅读(286) 评论(0) 推荐(0) 编辑