While working on my project, I was wondering, will using auto-destruct data if return will be inside of a using.
Example block of code:
using(ManagedObject obj = new ManagedObject()) 
{
    int usualNumber = 0;
    // some magic stuff
    ...
    // magic stuff ends
    return usualNumber; // return goes inside of 'using' brackets
}
And here is the question, will our ManagedObject which implements IDisposable be disposed by 'using' statement?
 
     
     
     
     
    