aspdotnet_website_programming thread: C# "Using" statement on 153
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 here? 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? Thanks, John
|





