简体   繁体   中英

ReSharper or VS - how can I auto generate a default implementation of a new abstract member in all sub-classes?

Suppose the following abstract class:

public abstract class Human
{
    public abstract string GetName();
}

If I have ten implementations of Human , and then add a new member:

public abstract class Human
{
    public abstract string GetName();
    public abstract string GetDescription();
}

How can I create a default implementation of GetDescription() in all my sub-classes? Is this possible?

I don't know why I wasn't seeing this but simply put the cursor over the member and:

Alt-Enter > Implement in derived classes

Either I am going blind, or I'm getting old or both because I've been using that for ages...

Thanks, @Lennart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM