K
Kevin Frey
Consider this simple example:
interface IReader
{
bool Read( );
};
class MyReader : IReader
{
bool Read( ); // or should it be bool IReader.Read( ) ?
};
When I declare the implementation of the Read( ) method, what syntax should
I be using - the interface-qualified method name, or not.
I seem to have found situations where the interface-qualified name was not
permitted (can't remember the exact circumstances). It's a pity because the
interface-qualified names really improve the readability of classes which
implement interfaces.
Can anyone state the rules when the qualification is necessary, and when it
will and won't work?
Thanks
interface IReader
{
bool Read( );
};
class MyReader : IReader
{
bool Read( ); // or should it be bool IReader.Read( ) ?
};
When I declare the implementation of the Read( ) method, what syntax should
I be using - the interface-qualified method name, or not.
I seem to have found situations where the interface-qualified name was not
permitted (can't remember the exact circumstances). It's a pity because the
interface-qualified names really improve the readability of classes which
implement interfaces.
Can anyone state the rules when the qualification is necessary, and when it
will and won't work?
Thanks