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?

Was it helpful?

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.

OTHER TIPS

The answer to your second question is :

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top