How to find all Classes implemeting IDisposable?

Posted by apoorv020 on Stack Overflow See other posts from Stack Overflow or by apoorv020
Published on 2010-06-07T09:25:11Z Indexed on 2010/06/07 9:32 UTC
Read the original article Hit count: 381

I am working on a large project, and one of my tasks is to remove possible memory leaks. In my code, I have noticed several IDisposable items not being disposed of, and have fixed that. However, that leads me to a more basic question, how do I find all classes used in my project that implement IDisposable? (Not custom created classes by normal Library classes).
I have already found one less-than-obvious class that implements IDisposable ( DataTable implements MarshalByValueComponent, which inherits IDisposable). Right now, I am manually checking any suspected classes by using MSDN, but isn't there some way through which I can automate this process?

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio-2008