/// <summary> /// Starts a finally block /// </summary> public FinallyBlock FinallyBlock() { if (hasFinallyBlock) { throw new InvalidOperationException("Exception block already has finally block"); } if (hasFaultBlock) { throw new InvalidOperationException( "Exception block already has a fault block - cannot have both fault and finally - try nesting this exception block in another that has its own finally block"); } EnsureTryBlockEnded(); hasFinallyBlock = true; generator.BeginFinallyBlock(); return(new FinallyBlock()); }