开发者

System.ServiceModel.ServiceHost implements IDisposable but Dispose is not public

开发者 https://www.devze.com 2023-02-17 15:18 出处:网络
Why is that开发者_Python百科? This is not a question about the using keyword.System.ServiceModel.ServiceHost implements the IDisposable interface explicitly. This prevents that interface complicating

Why is that开发者_Python百科?

This is not a question about the using keyword.


System.ServiceModel.ServiceHost implements the IDisposable interface explicitly. This prevents that interface complicating the the ServiceHost class itself. It also avoids situations where more than one interface implemented by a class defines a method with the same signature.

The Dispose method can be accessed by casting the ServiceHost object to an IDisposable.

Also helpful Q/A around it.

0

精彩评论

暂无评论...
验证码 换一张
取 消