-
Notifications
You must be signed in to change notification settings - Fork 18
Naming things
- Top level directories are kebab-case
- Directory names and file names are PascalCase, e.g. MyFile.cs
- Where possible the file name should be the same as the name of the main class in the file, e.g. MyClass.cs
- In general, prefer one core class per file
To differentiate words in an identifier, capitalize the first letter of each word in the identifier. Do not use underscores to differentiate words.
Capitalize the first character of each word (including acronyms over two letters in length), as shown in the following examples: PropertyDescriptor, HtmlTag
Names of classes, methods, enumerations, public fields, public properties, namespaces:
PascalCase
Names of local variables, parameters:
camelCase
Names of private, protected, internal and protected internal fields and properties:
_camelCase
For casing, a โwordโ is anything written without internal spaces, including acronyms. For example, MyRpc instead of MyRPC.
Names of interfaces start with I, e.g. IInterface.
These conventions are mainly based on the Microsoft .NET Framework Design Guidelines.
These are noteworthy pages of these guidelines:
- Naming Guidelines: Overview
- Naming Guidelines: Capitalization Conventions
- Naming Guidelines: General Naming Conventions
The conventions for C# are also based on the Microsoft C# conventions:
Other popular conventions and guidelines (which are similar, but have some conflicting rules):
Microsoft themselves seem to have conflicting rules too:
- Microsoft Capitalization Conventions:
Do not use underscores to differentiate words, or for that matter, anywhere in identifiers. - Microsoft C# Coding Conventions:
Use camel casing ("camelCasing") when namingprivateorinternalfields, and prefix them with_. - ๐ค
The ultimate guide to contribute to Maroon
Usage
๐ฎ Playing Maroon
๐จ Build Instructions
๐ป Integrating Maroon's WebGL Build
๐ Experiment Config JSON
General
๐ Home
๐ Software versions
๐ฌ Experiments
Workflow
๐ Git workflow
Conventions
๐ฌ Naming things
๐๏ธ Folder structure
๐ฆ Including components
๐ Scripts
๐ Scene Layout
๐จ Materials
๐ฟ 3D Models
๐ Audio
๐ค Typography
Documentation
๐ฎ Input
๐ญ Generated laboratory
๐ช Multiplayer