C/C++教程

apiCode/1/1.1/1.1.1

本文主要是介绍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();
	}
}

这篇关于apiCode/1/1.1/1.1.1的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!