【发布时间】:2022-01-18 00:46:54
【问题描述】:
谁能告诉我,如何在主体中实现我的功能? 所有作品,但我想做一个雇主目录,那么如何写雇员名单或海量?
class Catalog : Employe
{
Employe[] employes = new Employe[10];
Employe p1 = new Employe(14, "Mark", "James", 124151, "Coder", 4000);
public Catalog(int _age, string _firstName, string _lastName, int _id, string _job, int _salary) : base(_age, _firstName, _lastName, _id, _job, _salary)
{
employes[1] = p1;
}
public void CatalogLog()
{
for(int i = 0; i < employes.Length; i++)
Console.WriteLine(employes[i]);
}
}
class TestInheritence
{
public static void Main(string[] args)
{
Employe[] employes = new Employe[10];
}
}
【问题讨论】:
标签: c# visual-studio