tags:

views:

372

answers:

1

How i format following line without stylecopy warnings:

this.BeginInvoke(this.updateHandler,new object[]{this.tmpbuf});

Now i get 4 warnings:

 - 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.
+5  A: 
this.BeginInvoke(this.updateHandler, new object[] { this.tmpbuf });
  • SA1001 requires space after a comma
  • SA1011 requires space after closing square bracket
  • SA1012 requires space after opening curly bracket
  • SA1013 requires space before closing curly bracket

See StyleCop spacing rules for full description of the relevant rules.

Knut Haugen