-
Notifications
You must be signed in to change notification settings - Fork 0
Code Conventions
Jelle Jan Bleeker edited this page Oct 1, 2020
·
20 revisions
On this page you can find the code conventions for this project.
- Pascal casing for classes, methods and properties. (PascalCase)
- Camel casing for fields, parameters and variables. (camelCase)
- No magic numbers! (use enums)
- No hardcoded strings! (use constants)
- Type implicit! (No var)
- No abbreviations! (type command, not cmd AND type object, not obj)
- In general, follow the official guidelines as seen here: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions
- Start interface names with capital I.
- keep private fields and properties at the top of the file.
Properties are made with BackStores or by just using the auto property functions. See this microsoft page for more info: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/using-properties
- Brackets under definitions. Name() { }
- Or no brackets for oneliners. Name() return;
Om de UI backend van de UI components te kunnen unit testen maken we gebruik van het Modev-View-ViewModel. Een tutorial is hier te vinden.