禁用Resharper的注释格式

时间:2016-10-24 08:19:14

标签: c# resharper

有没有办法阻止Resharper重新格式化评论?我想把我的评论放在使用制表符自我对齐的代码后面。像:

private static IEnumerable<string> GetOperands(string grammar)
    => grammar.Replace(GetOpcode(grammar), "")                      // remove operand from grammar
        .Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries)  // operands are split with a ,
        .Select(s => s.Trim());                                     // remove any whitespace 

然而,当我进行代码清理时,Resharper将其格式化为:

private static IEnumerable<string> GetOperands(string grammar)
    => grammar.Replace(GetOpcode(grammar), "") // remove operand from grammar
        .Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries) // operands are split with a ,
        .Select(s => s.Trim()); // remove any whitespace 

(我认为)不会增加可读性。

0 个答案:

没有答案