更新时间:2023-10-28 09:55:16
是否有任何理由,你不能使用一个虚拟财产?这将提供正是你正在寻找的功能。它只是不会是一个字段
Is there any reason you can't use a virtual property? That would provide exactly the functionality you are looking for. It just wouldn't be a field.
protected abstract string[] array { get; }
...
...
protected override string[] array { get { return new string[]{"...","..."}; }}