apiCode/1/1.1/1.1.1

public abstract class myClass
{
	private string id = "";
	private string name = "";
	public string ID
	{
		get{ return id };
		set{ id = value};
		
	}
	
	public string Name
	{
		get{ return name};
		set{ name = value};
	}
	
	public abstract void ShowInfo();
}

public class DriverClass:myClass
{
	public override void ShowInfo()
{
	Console.WriteLine(ID+" "+Name);
}
}

class Program
{
	static void Main(string[] args)
	{
		DriverClass driverClass = new DriverClass();

		myClass myclass = driverClass;
		myClass.ID = "BH";
		myClass.Name = "MR"
		
		myClass.showInfo();
		Console.ReadLine();
	}
}

上一篇:php call_user_func_array用法


下一篇:计算机的认知