© { JSL }
80
Text Box: using Statements
using Statements
·after discussions on the .NET reflector
wM'Soft provided a solution consisting of...
wthe IDisposable interface in combination with...
wthe using statement
using (type variable = init) embedded-statement
{
    type variable = init;
    try {
        embedded-statement
    }
    finally {
        if (variable != null) {
            ((IDisposable)variable).Dispose();
        }
    }
}
precisely equivalent to