Sometimes I need to use several disposable objects within a function. Most common case is having StreamReader and StreamWriter but sometimes it\'s even more than this.
I am returning the variable I am creating in a using statement inside the using statement (sounds funny):
I have a complex program in which I have to first create, then use wrappers around bitmaps and send them across a lot of different classes. The problem in the end is deciding which classes should disp
I\'m having this issue with a live app. (Unfortunately this is post-mortem debugging - I only have this stack trace. I\'ve never seen this personally, nor am I able to reproduce).
I\'ve seen so much C# code in my time as a developer that attempt to help the GC along by setting variables to null or calling Dispose() on classes (DataSet for example) within thier own classes Dispo
This question is about dealing with unmanaged resources (COM interop) and making sure there won\'t be any resource leaks. I\'d appreciate feedback on whether I seem to do things the right way.
What is the better solution to manage Exit or Quit events when user exit to other pages with no action?. This event need to be raised only one time and be usefull to delete all temporary files or data
Certainly we should call Dispose() on IDisposable objects as soon as we don\'t need them (which is often merely the scope of a \"using\" statement).If we don\'t take that precaution then bad things, f
I have some problems to delete temporary folder and files on my server when users not finish some action in webpages and quit to other webpages. Initialy at Page Load folders are created to allow the
Which one of the below 2 code pieces is not calling dispose and therefore is bad practice: ... using(SomeIDisposable p = new SomeIDisposable())