Having a contructor extend into a sub-class from an abstract class?
本问题已经有最佳答案,请猛点这里访问。
我现在有一个抽象类,比如
1 2 3 4 5 6 7 8 9 | abstract class Users { private List<string> SelectedUsers; public Users(List<string> SelectedUsers) { this.SelectedUsers = SelectedUsers; } } |
和一个子类
1 2 3 4 | class UsersTypeOne : Users { //What do I put here in order to call the constructor in the abstract class } |
1 2 3 4 5 6 7 8 | class UsersTypeOne : Users { public UsersTypeOne(List<string> SelectedUsers) : base(SelectedUsers) { } } |