I have a class with the following definition, and I want it to have an override of Dispose method:
EDIT
it turns out there is a Dispose() method, but it's not an override. I was expecting an override. This may be an invalid question.... but why isn't it an override?
public class MyClient : IMyClient2
{
public void Dispose()
{
Dispose(true);
}
private void Dispose(bool disposing)
{
if(disposing)
{
Stop();
}
}
}
Where the interface it extends, and it's subsequent interface, are defined as:
public interface IMyClient2 : IMyClient
{
// one or two methods
}
public interface IMyClient : IDisposable
{
// a bunch of methods
}
I thought that implementing IDisposable would require that my class have the Dispose() override. But it doesn't and I don't know what I need to do to make it so that it does.
What do I need to do to be able to properly dispose of instances of my class?