в C # вы можете сделать:
interface YourInterface: IDisposable {
/// your methods
}
и класс, который реализует YourInterface
, должен также реализовать метод IDisposable
.
Конечно, тогда это верно:
YourInterface implementation = new Implementation();
IDiposable disposable = implementation;