摘要: public static void Main(string[] args) { Stopwatch sw = new Stopwatch(); //程序计时器 StringBuilder str = new StringBuilder... 阅读全文
posted @ 2015-05-13 22:21 自由无风 阅读(230) 评论(0) 推荐(0) 编辑
摘要: string s = "asdf"; //字符转char char[] c = s.ToCharArray(); Console.WriteLine(s[0]); //char转string string s1 =... 阅读全文
posted @ 2015-05-13 22:12 自由无风 阅读(7644) 评论(0) 推荐(0) 编辑
摘要: 项目右键引用 ,添加要引用的然后在代码用 using 绰用 阅读全文
posted @ 2015-05-13 21:45 自由无风 阅读(1728) 评论(0) 推荐(0) 编辑
摘要: public class Students { //创建对像时使用 public Students(string name, int age, char gender, int englist, int chinese, int math) { ... 阅读全文
posted @ 2015-05-13 21:16 自由无风 阅读(1060) 评论(0) 推荐(0) 编辑
摘要: 作用:帮助我们初始化对像(给对像的每个属性依次的赋值)构造函数是一个特殊的方法1、构造函数没有返回值,连void也不能写2、构造函数名称要和类名一样3、创建对像时会执行构造函数4、构造函数可以重载类中默认有一个构造函数(隐藏的),如果你创建了一个构造函数,不管是有参数的,还是无参数的,他默认的那个无... 阅读全文
posted @ 2015-05-10 22:13 自由无风 阅读(4201) 评论(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) 编辑