摘要: 第三章对于继承:继承是根据父类创建新子类的过程;对于继承:例:PublicclassFather{publicvoidsay(){//dosomething}}PublicclassSon:Father{Publicvoidsay(){//dosomething}}这这里Son就隐藏了Father的say方法,也就是覆盖了;但C#里希望这样写PublicclassSon:Father{Publicnewvoidsay()//多加一个new{//dosomething}}这里讲讲base关键字,上一章讲this的时候提过:Base是对父类的声明:在编译器里,”base.”后面就出现了父类里的属性 阅读全文
posted @ 2013-06-20 23:13 王贺blog 阅读(173) 评论(0) 推荐(0) 编辑
摘要: C#摘要第一章:数据类型:在定义变量的时候,记下规则,开头不能是数字,变量名只能包括字母“_”数字整型类型名称CTS类型说明范围sbyteSystem.SByte8位有符号的整数-128到127(-27到27-1)shortSystem.Int1616位有符号的整数-32768到32767(-215到215-1)intSystem.Int3232位有符号的整数-2147483648到2147483647(-231到231-1)longSystem.Int6464位有符号的整数-9223372036854775808到9223372036854775807(-263到263-1)byteSyst 阅读全文
posted @ 2013-06-20 22:24 王贺blog 阅读(188) 评论(0) 推荐(0) 编辑