# C-Sharp Convention

* [C# Framework version](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version)
* [What's new](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new)

## Naming Convention
* [Microsoft](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions)
* [MSDN](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/general-naming-conventions?redirectedfrom=MSDN)

| Object Name               | Notation   | Length | Plural | Prefix | Suffix | Abbreviation | Char Mask          | Underscores |
|:--------------------------|:-----------|-------:|:-------|:-------|:-------|:-------------|:-------------------|:------------|
| Namespace name            | PascalCase |    128 | Yes    | Yes    | No     | No           | [A-z][0-9]         | No          |
| Class name                | PascalCase |    128 | No     | No     | Yes    | No           | [A-z][0-9]         | No          |
| Constructor name          | PascalCase |    128 | No     | No     | Yes    | No           | [A-z][0-9]         | No          |
| Method name               | PascalCase |    128 | Yes    | No     | No     | No           | [A-z][0-9]         | No          |
| Method arguments          | camelCase  |    128 | Yes    | No     | No     | Yes          | [A-z][0-9]         | No          |
| Local variables           | camelCase  |     50 | Yes    | No     | No     | Yes          | [A-z][0-9]         | No          |
| Constants name            | PascalCase |     50 | No     | No     | No     | No           | [A-z][0-9]         | No          |
| Field name                | camelCase  |     50 | Yes    | No     | No     | Yes          | [A-z][0-9]         | Yes         |
| Properties name           | PascalCase |     50 | Yes    | No     | No     | Yes          | [A-z][0-9]         | No          |
| Delegate name             | PascalCase |    128 | No     | No     | Yes    | Yes          | [A-z]              | No          |
| Enum type name            | PascalCase |    128 | Yes    | No     | No     | No           | [A-z]              | No          |

* **Method Name** to start with verb. Eg. *Update*Projection(), *Calculate*Angle()

## NameSpace Naming Convention [Microsoft](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-namespaces)
* `<Company>.(<Product>|<Technology>)[.<Feature>][.<Subnamespace>]`
  * eg: `Mitech.Vision.Desktop`, `Mitech.Vision.Modules.Camera`, `MitechApp.Desktop`, `MitechLib.Modules.Recipes`, etc
* `PascalCamelCase` convention
* Use Plural names where appropriate