Use “convert to auto property” on multiple properties at once

前端 未结 2 519
再見小時候
再見小時候 2020-12-18 08:08

I find myself using Resharper\'s \"convert to auto property\" refactoring a lot to remove pre C# 3.0 boilerplate code.

Is there a way I can apply this to a

2条回答
  •  天涯浪人
    2020-12-18 09:00

    The ReSharper can do this:

    Options -> Code Cleanup -> Use auto-property, if possible
    

    Run code cleanup for the class - and you should be done.

提交回复
热议问题