-
Notifications
You must be signed in to change notification settings - Fork 2
Contributing Code Style
Starciad edited this page Jan 14, 2025
·
1 revision
We follow the Microsoft C# coding conventions, with some exceptions.
- Prefix
S
in file names andIS
for interfaces; - Use
this
to reference fields and properties; - Avoid asynchronous code in inappropriate contexts.
- Do not use
var
; - Mark immutable fields as
readonly
; - Use
internal
andpublic
sparingly; - Utilize object initializers whenever possible.
- All created constants must be strictly only in the constants directory present in some file.
Prefer inline form for out
declarations: SomeOutMethod(42, out PType value);
.
Always order members and properties:
- Properties
- Variable Fields
- Events and Delegates
- Constructors
- Methods
Stardust Sandbox • (c) 2024 Davi "Starciad" Fernandes | Home • Itch.io Store Page • Stable Releases (GitHub) • Contributor Guide