1
Vote

Auto-Implement Dispose Checker

description

If you implement IDisposable, you should throw ObjectDisposedException whenever any member on your object is used after Dispose() is called. Doing something like this:
 
[CheckForDispose]
public class MyClass : IDisposable { // ... }
 
Would do that check for the developer.

comments