In terms of coder productivity what is the quickest way in VS 2005 or 2008 to determine if Foo implements IDisposable. It has happened to me on more than one occasion that I’ve been caught using a type without a using block because it never occured to me that the thing would need to implement IDisposable.
In terms of coder productivity what is the quickest way in VS 2005 or
Share
Put it in a using statement and see if it compiles:
This won’t compile if the
TypeInQuestiondoesn’t implement IDisposable.The other fastest way is to use ReSharper, click on the variable (
xin this case), and see if it has a suggestion to put it in a using statement.