I know I can’t overload a return type (I think I know this).
void F()
{
}
bool F()
{
return true;
}
..produces error already defines a member called 'F' with the same parameter types
However, I’m reading the documentation for ISet from MSDN, and I think I see the two Add methods that only vary by return type.
What is going on here?
The first “Add” method is actually
ICollection<T>.Add, which is inherited.When this is implemented in a class, at least one of the two
Addmethods will need to be explicitly implemented, ie: