Automatically generate implementations of base class methods

后端 未结 7 948
我在风中等你
我在风中等你 2021-02-02 07:33

Is there a shortcut of some kind in C# (VS 2008) to automatically implement the virtual and abstract base class methods in a derived class?

7条回答
  •  我在风中等你
    2021-02-02 08:12

    Just type the Interface that you want to implement, and then click on the Smart Tag, a context menu will popup, and then you can select either Implement Interface or Implement Interface Explicitly:

    All the members to be overridden will be contained within a code region that is named to reflect its purpose.

    All the members will have a line that throws a NotImplementedException.

提交回复
热议问题