Skip to content

Commit b515e91

Browse files
authored
Use C# 13 (#1827)
1 parent 585bd6a commit b515e91

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.editorconfig

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ csharp_style_prefer_top_level_statements = true:silent
8989
csharp_style_expression_bodied_methods = when_on_single_line:silent
9090
csharp_style_expression_bodied_constructors = false:silent
9191
csharp_style_expression_bodied_operators = false:silent
92-
csharp_style_expression_bodied_properties = true:silent
92+
csharp_style_expression_bodied_properties = true:suggestion
9393
csharp_style_expression_bodied_indexers = true:silent
9494
csharp_style_expression_bodied_accessors = true:silent
9595
csharp_style_expression_bodied_lambdas = true:silent
@@ -100,6 +100,15 @@ csharp_style_throw_expression = true:suggestion
100100
# IDE0058: Expression value is never used
101101
dotnet_diagnostic.IDE0058.severity = suggestion
102102

103+
# IDE0161: Convert to file-scoped namespace
104+
dotnet_diagnostic.IDE0161.severity = suggestion
105+
106+
# IDE0290: Use primary constructor
107+
dotnet_diagnostic.IDE0290.severity = suggestion
108+
109+
# IDE0025: Use expression body for property
110+
dotnet_diagnostic.IDE0025.severity = suggestion
111+
103112
[*.{cs,vb}]
104113
#### Naming styles ####
105114

@@ -170,3 +179,6 @@ dotnet_diagnostic.CA1043.severity = suggestion
170179

171180
# IDE0046: Convert to conditional expression
172181
dotnet_diagnostic.IDE0046.severity = suggestion
182+
183+
# IDE0028: Simplify collection initialization
184+
dotnet_diagnostic.IDE0028.severity = suggestion

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
</PropertyGroup>
8383

8484
<PropertyGroup>
85-
<LangVersion>11.0</LangVersion>
85+
<LangVersion>13</LangVersion>
8686
</PropertyGroup>
8787

8888
<PropertyGroup>

0 commit comments

Comments
 (0)