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/skills/csharp-snippet-modernization/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Apply these changes when they preserve behavior and sample clarity:
34
34
timeZoneTime.DateTime);
35
35
```
36
36
- Use raw string literals (or interpolated raw string literals) for paragraph-style output.
37
-
- Use the `new`operator to construct objects. Omit the type name after `new` when the target type is evident.
37
+
- Use `new` to construct objects. Omit the type name when the target type is evident.
38
38
- Use collection expressions to initialize collections and arrays wherever possible.
39
39
- Convert eligible value-producing `switch` statements to switch expressions.
40
40
- Use auto-implemented properties instead of defining a separate field.
@@ -52,7 +52,7 @@ Apply these changes when they preserve behavior and sample clarity:
52
52
- Add `using` statements for disposable types, and remove redundant calls to `Close()` or `Dispose()`.
53
53
- Prune unnecessary package references from project files.
54
54
- Use compound assignment.
55
-
- Replace calls to obsolete APIs with their replacement. For example, replace `WebRequest` with `HttpClient`.
55
+
- Replace calls to obsolete APIs with their recommended replacements (per the `ObsoleteAttribute` message and official docs). For example, replace `WebRequest` with `HttpClient`.
56
56
57
57
Don't introduce `var`; this repository prefers explicit types.
0 commit comments