Branko Dimitrijevic
Branko Dimitrijevic

Reputation: 52157

Naming convention for enum extension class

Let's say I have an enum and an extension method for it:

public enum EFoo {
    One,
    Two,
    Three
}

public static class FooExt {
    public static void FooMethod(this EFoo foo) {
        // ...
    }
}

What would be a better naming convention for the extension class:

I know this is somewhat subjective and probably not the best question for SO, but I was wondering if there is an established convention that escaped me so far?

Upvotes: 0

Views: 651

Answers (1)

SLaks
SLaks

Reputation: 888293

The Enum should be named Foo, not EFoo.
C# does not encourage Hungarian Notation.

The extension class should then be named FooExtensions

Upvotes: 6

Related Questions