Top "Idisposable" questions

IDisposable is an interface within the Microsoft .NET Framework's Base Class Library (BCL).

How to properly dispose of a WebResponse instance?

Normally, one writes code something like this to download some data using a WebRequest. using(WebResponse resp = request.GetResponse()) // WebRequest …

c# .net idisposable webresponse
Use of Process with using block

Possible Duplicate: What happens if I don't close a System.Diagnostics.Process in my C# console app? As System.Diagnostics.…

c# process coding-style idisposable using-statement
How and when to dispose/garbage collect a singleton instance

I am using a Singleton instance created out of a nested class. This instance holds some static collections which are …

c# garbage-collection singleton idisposable code-design
Why is FileStream not closed by XmlReader

So I am using the FileStream inside XmlReader using (XmlReader reader = XmlReader.Create(new FileStream(archivePath, FileMode.Open), readerSettings)) { reader.…

c# .net idisposable xmlreader
Dealing with .NET IDisposable objects

I work in C#, and I've been pretty lax about using using blocks to declare objects that implement IDisposable, which …

c# .net visual-studio idisposable using-statement
How to fix a CA2000 IDisposable C# compiler warning, when using a global cache

CA2000 is a warning regarding the IDisposable interface: CA2000 : Microsoft.Reliability : In method 'ImportProcessor.GetContext(string)', call System.IDisposable.…

c# visual-studio-2010 code-analysis idisposable ca2000
What does Using(.....){...} mean

Possible Duplicates: Using the using statment in c# What is the C# Using block and why should I use it? …

c# idisposable using using-statement
return the variable used for using inside the using C#

I am returning the variable I am creating in a using statement inside the using statement (sounds funny): public DataTable …

c# dispose idisposable using using-statement
Using the Destructor/Dispose of the base class?

In C#, as mentioned in the Documentation, and this nice post's accepted answer, it's stated that classes don't inherit the …

c# dispose destructor idisposable finalizer
What is the difference between managed and native resources when disposing? (.NET)

I was reading the MSDN article about how to implement IDisposable and I am uncertain about the difference between managed …

.net resources native idisposable