Given that the keyword “using” should always be used when applicable, I wanted to go with that. The problem is, how do I know which objects I can use USING?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use tools like FxCop or CodeRush to identify code where you don’t call
Dispose/useusingon objects implementingIDisposable. They will warn you in this case.Also, in Visual Studio, you can use the Object Browser to see which types implement
IDisposable.