public delegate void Method();
public struct Finally : IDisposable
{
public Finally(Method call)
{
if (call == null)
{
throw new
ArgumentNullException();
}
this.call = call;
}
public override void Dispose()
{
call();
}
private readonly Method call;
}