You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,16 @@ if (something is Bucket bucket)
82
82
}
83
83
```
84
84
85
+
### Use collection initializers or expressions
86
+
* Use [Use collection initializers or expressions](https://learn.microsoft.com/en-gb/dotnet/fundamentals/code-analysis/style-rules/ide0028) Use collection initializers or expressions.
87
+
88
+
e.g.
89
+
90
+
```csharp
91
+
List<int>list= [1, 2, 3];
92
+
List<int>list= [];
93
+
```
94
+
85
95
### File Scoped Namespaces
86
96
* Use [file scoped namespaces](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces) to help reduce code verbosity.
0 commit comments