p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

aspdotnet_website_programming thread: C# "Using" statement on 153

Message #1 by john.livermore@i... on Sun, 23 Mar 2003 14:07:42
My understanding of this keyword is that it causes the Dispose method of 
any declared variables inside its scope to be automatically called.

How would the code read differently if the "Using" statement isn't applied 

Is there really a need to call the Dispose method in this case?  It seems 
the garbage collector would take care of this?  Maybe it is just more 
efficient to call Dispose so that memory collection will occur faster?


  Return to Index