I struck up a conversation with my colleague today, who said she'd just learned the reason behind using the using statement.
 //Using keyword is used to clean up resources that require disposal (IDisposable interface). 
 using (StreamReader reader = new StreamReader(@"C:\test.txt")) 
 { 
 string line = reader.ReadLine(); 
 } 
I pointed out that the object is marked as "Can be disposed" but not actually disposed and garbage-collected unless GC decides to do so.
She responded that the object will be disposed automatically once that using statement ends because the using statement is translated to try-catch-finally block. So, the object must get disposed at the very end of the using statement.
I was confused by this, because I know that using a using statement does not guarantee that the object gets GC-collected. All that happens is that the Dispose() method would be called. The GC decides when to GC it regardless. But when she asked for proof, I could not find any.
Does anyone know how this works, and how to prove it?