DS
Size: a a a
DS
DS
{
ResourceType resource = expression;
try {
statement;
}
finally {
((IDisposable)resource).Dispose();
}
}
DS
DS
DS
IC
DS
DS
IC
local-variable-declaration must be System.IDisposable or a type that can be implicitly converted to System.IDisposable
DS
// First: if the type is a non-nullable value type then we do not do the
// *boxing conversion* from the resource to IDisposable. Rather, we do
// a *constrained virtual call* that elides the boxing if possible.
//
// Now, you might wonder if that is legal; isn't skipping the boxing producing
// an observable difference?
DS
T
AH
AH
AH
S
AH
T
IC
constrained
которая позволяет сделать полиморфный вызов для структурAH