Question

In one of the requirement (custom performance counters for my application) i am writing Interfaces first, but i am not sure whether i am writing proper name as per Interface guildeline. I used plural and use verb, please verify and suggest

interface ICreateCounters
{
    bool CreateCategories(Categories objCategories) {}
    bool CreateCounters(Counters objCounters){}
}

interface UseCounters
{
    Increment()
}

Please advice?

Is there any existing library available?

Était-ce utile?

La solution

Hemant sir,
There are no explicit rules for an interface, but in Microsoft all the interfaces do start with capital letter 'I'.

The name that follows the letter 'I' should start with capital letter and words should describe the meaning and work.

In your case may be use IIncreementalCounter or ICounterOperation instead of UseCounters.

Autres conseils

The answer to your second question is :

Microsoft hase performance counter class So if this fits your needs use this

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top