+1  A: 

You do not need to implement the full pattern if you are not using unmanaged resources. There is however one side benefit to the pattern. If someone wants to extend your class they can override Dispose(bool) and then call base.Dispose(true) to make sure all resources are disposed.

ChaosPandion
+2  A: 

If you're not holding unmanaged resources directly (i.e. even SafeHandle is not holding them directly), then in general:

  • Don't implement the finalizer
  • Don't implement Dispose(bool)
  • DO mark your class as sealed.

It is a great pity that for years all the widely distributed documentation for IDispose was intended for people writing interop libraries (i.e. the .NET framework authors themselves), and completely ignored a much more common usage pattern for everyone else.

Things have improved, and there is now a more lightweight pattern recognised by fxcop (VS Code Analysis) for sealed types: http://msdn.microsoft.com/en-us/library/ms244737%28VS.80%29.aspx

Will Dean
A: 

You could inherit from Component assuming you don't need a different base class. But, if you aren't doing anything too special you could just use the Dispose method. As ChaosPandion pointed out this could cause problems is someone else tries to extend your class later so you may want to seal your implementations.

Matthew Whited
A: 

If someone tries to extend the class by overriding Dispose(boolean) and you haven't implemented it, that will fail. But if they try overriding Dispose(), that will work. I don't see any reason the class should need to be sealed if one doesn't expect descendant classes to directly control any unmanaged resources.

supercat