Is it possible to not implement a method inherited from an interface in C#? -
Looking at Project Server 2010 SDK (found in NET reflector) I found something interesting that confuses me.
Obviously, inherited from SvcProject.ProjectClient
class in
, which is an abstract class which implements the ProjectServerServices.dll
System.ServiceModel.ClientBase & lt; Project & gt; System.IDisposable
interface. However, when I inspect the SvcProject.ProjectClient
class (which is not intangible), there is no dissection
what is the method? I thought every method obtained from the interface should be implemented in concrete implementation (otherwise the interface is used). Is NIT Reflector Lying To Me? Is Microsoft foraying this requirement for any reason? Is going on?
This is possibly explicitly applied, like this: < /p>
zero idisposable.Dispose () {// code here}
Either it or it handles the method from the base class only because ClientBase & Lt; T & gt;
Abstract element does not mean that it can not implement IDisposable
itself correctly, actually it is to implement it either or to a For determining the neutral method, it will force the class to implement the derivative.
In any way, the method may be somehow. / P>
Clear Interface Implementation means that the method is only available when the example is viewed through interface type. For example:
class Foo: IDisposable {zero} IDisposable.Dispose () {}} ... Foo foo = new Foo (); Foo.Dispose (); // Invalid: compile time error IDisposable d = foo; D.Dispose (); // valid ((IDisposable) foo) dissonance (); // valid (no need for temporary variable)
Comments
Post a Comment