摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 复习接口{ class Program { static void Main(string[] args) { //父类引用指向子类对象。 Flyable f = new UFO(); f.Fly(); Console.ReadKey(); } } interf... 阅读全文
posted @ 2013-08-25 18:16
小新+
阅读(129)
评论(0)
推荐(0)
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 猫狗面试题{ class Program { static void Main(string[] args) { Cat c1 = new Cat(); Dog d1 = new Dog(); Mouse m1 = new Mouse(); ////定义一个Animal类型的泛型的lis... 阅读全文
posted @ 2013-08-25 18:07
小新+
阅读(286)
评论(0)
推荐(0)
摘要:
一、变量可以放数据的容器。定义:类型加变量名例子:string s1, int i1, bool bInt i2 = 5;Int i2;I2=5;变量的名字不能重名(不严格)//int i3 = 33;//定义一个变量i3,赋值为33i3 = 33;//为已有变量i3赋值为33变量只能声明一次,但是可以多次使用。int i1=5;int i1=6;不可以。但是int i1=5;i1=6;是 可以的。二、常用基本数据类型string、int 、char 、bool long等。bool的取值:true、false。int的表示范围。long有多long 字符串的声明 String name = 阅读全文
posted @ 2013-08-25 18:05
小新+
阅读(181)
评论(0)
推荐(0)
浙公网安备 33010602011771号