The System.IO.Stream abstract class now implements the IDisposable interface fully (explicitly and non-explicitly). What did it do before that?! Stream implemented the interface explicitly, making only interface instances able to call Dispose(). Before .Net 2.0, it was up to you to implement the IDisposable interface and clean up your derived class' resources via an interface object. You can now call Dispose() methods directly from an object that isn't cast to IDisposable.
New method:
No comments:
Post a Comment