Visual Studio 2010: Easiest way to duplicate a class?

后端 未结 7 1606
深忆病人
深忆病人 2021-01-18 19:08

Is there an easy way to duplicate a class with a different name?

7条回答
  •  孤城傲影
    2021-01-18 19:39

    Copy and paste and give the class a new name ?

    It is generally not a good idea just to copy code and give it a new class name. It appears you may want something to do with inheritance / interfaces?

    How about creating a base class and then use that base class for further classes that have the same / close to the same functionality.

提交回复
热议问题