Skip to content

Commit 841b45b

Browse files
Add .editorconfig for consistent C# code style
1 parent 2c608c1 commit 841b45b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# EditorConfig helps maintain consistent coding style across editors
2+
root = true
3+
4+
[*.cs]
5+
indent_style = space
6+
indent_size = 4
7+
insert_final_newline = true
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
11+
# C# code style rules
12+
dotnet_sort_system_directives_first = true
13+
dotnet_separate_import_directive_groups = true
14+
dotnet_style_qualification_for_field = false
15+
dotnet_style_qualification_for_property = false
16+
dotnet_style_qualification_for_method = false
17+
dotnet_style_predefined_type_for_locals_parameters_members = true
18+
dotnet_style_predefined_type_for_member_access = true
19+
csharp_new_line_before_open_brace = all
20+
csharp_indent_case_contents = true
21+
csharp_indent_switch_labels = true
22+
csharp_space_after_cast = false
23+
csharp_space_after_keywords_in_control_flow_statements = true
24+
csharp_space_before_open_square_brackets = false
25+
csharp_space_around_binary_operators = before_and_after
26+
csharp_preserve_single_line_statements = false
27+
csharp_preserve_single_line_blocks = false

0 commit comments

Comments
 (0)