IntelliTect Guidelines

IntelliTect's guidelines for coding and architecture. Documentation for IntelliTect's .NET Compiler Platform (Roslyn) Analyzers.


Project maintained by IntelliTect Hosted on GitHub Pages — Theme by mattgraham

OOXX Block - Naming

INTL0001

Fields _PascalCase

Fields should be specified in _PascalCase. Always with a leading underscore, regardless of visibility modifier.

Allowed

class SomeClass
{
    public string _MyField;
}

Disallowed

class SomeClass
{
    public string _myField;
    public string myField;
}

INTL0002

Properties PascalCase

Fields should be PascalCase

Allowed

class SomeClass
{
    public string MyProperty { get; set; }
}

Disallowed

class SomeClass
{
    public string myProperty { get; set; }
    public string _MyProperty { get; set; }
}

INTL0003

Methods PascalCase

Methods, including local functions, should be PascalCase

Allowed

class SomeClass
{
    public string GetEmpty() {

        var output = LocalFunction();

        string LocalFunction() {
            return string.Empty();
        }

        return output;
    }
}

Disallowed

class SomeClass
{
    public string getEmpty() {

        var output = localFunction();

        string localFunction() {
            return string.Empty();
        }

        return output;
    }
}