StyleCop formatting

c#, stylecop

Solution

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.

Problem

How can I format the following line to eliminate StyleCop 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.`

Original source