【发布时间】:2010-11-07 00:21:23
【问题描述】:
如何格式化以下行以消除 StyleCop 警告:
this.BeginInvoke(this.updateHandler,new object[]{this.tmpbuf});
现在,我收到 4 个警告:
Warning 4 SA1001: Invalid spacing around the comma.Warning 5 SA1011: Invalid spacing around the closing square bracket.Warning 6 SA1012: Invalid spacing around the opening curly bracket.Warning 7 SA1013: Invalid spacing around the closing curly bracket.
【问题讨论】:
-
CTRL+K 后跟 CTRL+D 将为您修复 Visual Studio 中当前代码文件中的格式。
-
风格警察——真是个笑话。当我拼错一个单词时,我的拼写检查器会提供纠正它。它没有说“无效的拼写”,让我去猜测。