IntelliTect / IntelliTect/CodingGuidelines

C# 9 Guideline Proposals

未关闭
#138 1 条评论 0 个 reaction 已指派 1 人 已被 @Keboo 认领 在 GitHub 查看
documentation good first issue
主要语言
C#
星标
12
派生
16
平均合并
2 分钟
30 天内合并 PR
7

描述

- CONSIDER using records over classes
Unless:
- Inheritance chains with classes are required
- The identity of the object is not based of the value of all its fields
- The type is in a public API that may be consumed by older versions of C#
- AVOID positional records when validation of positional members is required
- CONSIDER using init properties instead of readonly properties for optional values
- DO define a constructor to allow setting init properties for backwards compatibility with pre-C# 9
- DO name record positional parameter with PascalCase

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。