草庐IT

GiveBonus

全部标签

c# - 如何在没有抽象基类的情况下强制覆盖后代中的方法?

问题标题似乎有点困惑,但我会在这里尝试清除我的问题。usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApplication1{publicabstractclassEmployee{privatestringname;privateintempid;BenefitPackage_BenefitPackage=newBenefitPackage();publicstringName{get{returnthis.name;}set{this.name

c# - 如何在没有抽象基类的情况下强制覆盖后代中的方法?

问题标题似乎有点困惑,但我会在这里尝试清除我的问题。usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApplication1{publicabstractclassEmployee{privatestringname;privateintempid;BenefitPackage_BenefitPackage=newBenefitPackage();publicstringName{get{returnthis.name;}set{this.name