ClientBase doesn't implement IDisposable member

前端 未结 3 1321
旧巷少年郎
旧巷少年郎 2021-02-20 14:08

How is it possible for the System.ServiceModel.ClientBase abstract class to implement IDisposable Interface if the Dispose() Method declaration is not visible/declared?

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-20 14:09

    ClientBase implements IDisposable using explicit interface implementation.

    The implementation for this just calls close:

    void IDisposable.Dispose()
    {
        this.Close();
    }
    

提交回复
热议问题