What is use of Non abstract methods in abstract classes and also how to consume it the same in c#.NET?
No links please...........
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Parveen SiwachPosted May 28, 2013, 2:03 AM
Example:
The System.IO.Stream class is abstract. It implements IDisposable.
Stream.Dispose is a non-abstract method that calls the virtual Close method (not abstract, but it could be in a similar type).
This allows derived types to support IDispose without having to write any code for it, it's already implemented by the base class.
The work of Disposing is done by the Close method.