-
-
Notifications
You must be signed in to change notification settings - Fork 3
Contributing Code Style
Starciad edited this page Jan 31, 2026
·
3 revisions
We follow the Microsoft C# coding conventions, with some exceptions.
- Use
thisto reference fields and properties - Avoid asynchronous code in inappropriate contexts
-
Do not use
var -
Mark immutable fields as
readonly -
Use
internalandpublicsparingly -
Utilize object initializers whenever possible
-
All created constants must be strictly in the constants directory in some file
-
All source code files must include the following license header at the top:
/* * Copyright (C) 2023 Davi "Starciad" Fernandes <davilsfernandes.starciad.comu@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */
-
Use the automatic code cleaner provided by Visual Studio whenever possible to ensure your code aligns with the project's styling guidelines
Prefer inline form for out declarations: SomeOutMethod(42, out PType value);
Stardust Sandbox • (c) 2023 Davi "Starciad" Fernandes | Home • Steam Store Page • Itch.io Store Page • Stable Releases (GitHub)