上一页 1 2 3 4 5 6 ··· 9 下一页

2013年5月13日

窗体

摘要: system.windows.forms命名空间中的Application 提供了一系列管理窗口程序的静态方法,比如Run()方法启动程序,用Exit()方法退出程序,用EnableVisualStyles()方法启动应用程序的可视化样式。 阅读全文

posted @ 2013-05-13 09:03 杨柳清枫2012 阅读(115) 评论(0) 推荐(0)

2013年5月9日

47 异常2

摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 抛出异常{ class Program { static void Main(string[] args) { try { Console.WriteLine("请输入0-10之间的数"); int number = Convert.ToInt32(C... 阅读全文

posted @ 2013-05-09 21:48 杨柳清枫2012 阅读(76) 评论(0) 推荐(0)

46 异常

摘要: try -catchtry -catch - finallyView Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 异常{ class Program { static void Main(string[] args) { Console.WriteLine("请输入分母"); try { int a = Co... 阅读全文

posted @ 2013-05-09 21:04 杨柳清枫2012 阅读(85) 评论(0) 推荐(0)

44 命名空间和 装箱拆箱操作

摘要: namespace作用 用于区分组织不同类View Code using System;/*using System.Collections.Generic;using System.Linq;using System.Text;*/namespace Namespace_1{ class Program { static void Main(string[] args) { //命名空间用于区分和组织的作用。不同的实例引用相应的空间。 A.AA.A a = new A.AA.A(); a... 阅读全文

posted @ 2013-05-09 19:51 杨柳清枫2012 阅读(97) 评论(0) 推荐(0)

2013年5月8日

43 强数据类型

摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 类型的判定{ class Program { static void Main(string[] args) { Console.WriteLine("int:"+sizeof(int)); Console.WriteLine("long:" + sizeof(long)); Consol... 阅读全文

posted @ 2013-05-08 23:16 杨柳清枫2012 阅读(176) 评论(0) 推荐(0)

接口的多继承和显示实现

摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 接口的多继承{ class Program { static void Main(string[] args) { IA a = new C(); a.Breath(); IB b = new C(); b.Breath(); } } cla... 阅读全文

posted @ 2013-05-08 22:25 杨柳清枫2012 阅读(118) 评论(0) 推荐(0)

41 接口的继承

摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 接口{ class Program { static void Main(string[] args) { IBankAccount account = new Bank();//接口的多态 Izhuanzhang youaccount = new Zk(); account.cunkua... 阅读全文

posted @ 2013-05-08 21:54 杨柳清枫2012 阅读(102) 评论(0) 推荐(0)

40 向下转换 as 定义接口

摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 向下转换{ class Program { //基类向派生类转换成为向下转换 //用is关键字进行检查, //向下转换如想使用派生类的方法需要进行强制转换 static void Main(string[] args) { B b = new B(); A a = b;... 阅读全文

posted @ 2013-05-08 21:25 杨柳清枫2012 阅读(122) 评论(0) 推荐(0)

2013年5月7日

39,多态,is运算符

摘要: 一个基类的引用符,可以指向多种派生类对象,具有多种不同的形态叫做多态 阅读全文

posted @ 2013-05-07 22:06 杨柳清枫2012 阅读(82) 评论(0) 推荐(0)

38 派生类中的构造函数 object类,ToString

摘要: 派生类中的构造函数(有参,无参)、View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Gz{ class Program { static void Main(string[] args) { C abc = new C(); } } class A { private int a; public A() { ... 阅读全文

posted @ 2013-05-07 21:22 杨柳清枫2012 阅读(136) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 9 下一页

导航