Visual Studio 2010: Easiest way to duplicate a class?

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

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

7条回答
  •  攒了一身酷
    2021-01-18 19:57

    First of all: now there is the option of "Copy Class" with the MS powertools for VS (marketplace)

    Second: to all the critics that know better - there are legitimate cases where you want to copy a class as a starting point. I for example have a base class and from it I derive dozens of classes with different implementations, yet I do have a "reference class" derived from the base which already contains the overides, comments, etc. so I do not have to repeat the same over and over again. This is just one of the many situation where you want to copy a class.

提交回复
热议问题