摘要:
using System;namespace inherit{ class baseClass { public virtual string getName() { return "leon"; } public virtual void setName(string name) { } } class SubClass:baseClass { public SubClass(string name) ... 阅读全文
摘要:
/* * Created by SharpDevelop. * User: Administrator * Date: 2013-3-24 * Time: 20:29 * * To change this template use Tools | Options | Coding | Edit Standard Headers. */using System;namespace construct{ class Car { private string name; private int luen; public Car(string name, int luen) { Co... 阅读全文
摘要:
变量声明:int number;number = 10;或int number = 10;常量声明:const int number = 10; //必须在声明时进行初始化预定义数据类型有两种:值类型(13个)、引用类型(两个:string,object)值类型:1、整型2、浮点3、decimal decimal memory = 1000 decimal memory2 = 1000.21m //如果有小数点后面要加m标识为decimal4、bool5、字符型(char)引用类型:1、object2、string 阅读全文