From 18dc9338073265c40bc3d29ef7987bd1935fdb72 Mon Sep 17 00:00:00 2001 From: Paul Joannon <437025+paulloz@users.noreply.github.com> Date: Sat, 30 Mar 2024 18:27:05 +0100 Subject: [PATCH] Update c_sharp_style_guide.rst --- tutorials/scripting/c_sharp/c_sharp_style_guide.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/scripting/c_sharp/c_sharp_style_guide.rst b/tutorials/scripting/c_sharp/c_sharp_style_guide.rst index 2787d355241..606415c8b6d 100644 --- a/tutorials/scripting/c_sharp/c_sharp_style_guide.rst +++ b/tutorials/scripting/c_sharp/c_sharp_style_guide.rst @@ -153,11 +153,11 @@ Insert a space: * Around a colon in a type declaration. * Around a lambda arrow. * After a single-line comment symbol (``//``), and before it if used at the end of a line. +* After the opening brace, and before the closing brace in a single line initializer. Do not use a space: * After type cast parentheses. -* Within single line initializer braces. The following example shows a proper use of spaces, according to some of the above mentioned conventions: @@ -174,7 +174,7 @@ The following example shows a proper use of spaces, according to some of the abo public void MyMethod() { - int[] values = {1, 2, 3, 4}; // No space within initializer brackets. + int[] values = { 1, 2, 3, 4 }; int sum = 0; // Single line comment.