在Resharper中,如何删除字段之间的间距?

时间:2017-10-10 22:34:52

标签: c# visual-studio resharper

我已经尝试将换行符编辑为0但它只是不起作用,在代码清理时我想在下面编写以下代码:

internal bool AllowTradingRequests { get; set; }

internal bool AllowUserFollowing { get; set; }

internal bool AllowFriendRequests { get; set; }

internal bool AllowMessengerInvites { get; set; }

internal bool AllowPetSpeech { get; set; }

internal bool AllowBotSpeech { get; set; }

internal bool AllowPublicRoomStatus { get; set; }

internal bool AllowConsoleMessages { get; set; }

internal bool AllowGifts { get; set; }

internal bool AllowMimic { get; set; }

internal bool ReceiveWhispers { get; set; }

internal bool IgnorePublicWhispers { get; set; }

internal bool PlayingFastFood { get; set; }

转入:

internal bool AllowTradingRequests { get; set; }
internal bool AllowUserFollowing { get; set; }
internal bool AllowFriendRequests { get; set; }
internal bool AllowMessengerInvites { get; set; }
internal bool AllowPetSpeech { get; set; }
internal bool AllowBotSpeech { get; set; }
internal bool AllowPublicRoomStatus { get; set; }
internal bool AllowConsoleMessages { get; set; }
internal bool AllowGifts { get; set; }
internal bool AllowMimic { get; set; }
internal bool ReceiveWhispers { get; set; }
internal bool IgnorePublicWhispers { get; set; }
internal bool PlayingFastFood { get; set; }

正如我所说,我已经将换行计数设为0,我还需要做什么?这是一个错误还是我没有正确配置?

我尝试过代码清理,但它只会产生空间结果,即每个字段之间的空格。

1 个答案:

答案 0 :(得分:0)

还有设置" C#\ Formatting Style \ Blank Lines" "围绕领域"和"围绕单线领域"可以设定。

编辑:刚刚注意到,这些属性不是字段。看看"周围的自动/抽象属性/事件"和"围绕单行自动/抽象属性/事件"设置在" C#\格式化样式\空白行"。