Is there a ToString() generator available in Visual Studio 2010?

前端 未结 11 750
伪装坚强ぢ
伪装坚强ぢ 2021-01-03 17:39

Is there any way to generate a ToString() using Visual Studio 2010?

I really don\'t want to do this by hand!

[EDIT]

I\'m looking for a s

11条回答
  •  隐瞒了意图╮
    2021-01-03 18:19

    Since the logic of the overridden ToString() method would depend on your own business needs, the only thing I could imagine is an add-in which creates the empty ToString() override for you calling base.ToString() inside, if you then do not customize its content it does not make any sense to have it like that.

    Visual Studio already helps you a lot, at least in C#, if you start typing public overrides.

提交回复
热议问题