Skip to content

Commit 2227328

Browse files
authored
Merge pull request godotengine#9164 from paulloz/dotnet/space-in-single-line-initializers
Update C# style guide (spaces in single line initializers)
2 parents 876fe97 + 18dc933 commit 2227328

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorials/scripting/c_sharp/c_sharp_style_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ Insert a space:
154154
* Around a colon in a type declaration.
155155
* Around a lambda arrow.
156156
* After a single-line comment symbol (``//``), and before it if used at the end of a line.
157+
* After the opening brace, and before the closing brace in a single line initializer.
157158

158159
Do not use a space:
159160

160161
* After type cast parentheses.
161-
* Within single line initializer braces.
162162

163163
The following example shows a proper use of spaces, according to some of the above mentioned conventions:
164164

@@ -175,7 +175,7 @@ The following example shows a proper use of spaces, according to some of the abo
175175
176176
public void MyMethod()
177177
{
178-
int[] values = {1, 2, 3, 4}; // No space within initializer brackets.
178+
int[] values = { 1, 2, 3, 4 };
179179
int sum = 0;
180180
181181
// Single line comment.

0 commit comments

Comments
 (0)