Open sandboxFocus

Method UnwrapBlock

UnwrapBlock(IStatement)

Unwraps a block (i.e. remove its braces), if the statement is a block, and returns the resulting IStatementList.

Declaration
public static IStatementList UnwrapBlock(this IStatement statement)
Parameters
Type Name Description
IStatement statement

The statement to unwrap.

Returns
Type Description
IStatementList

A statement list containing the statements within the block, or a list with the original statement if it is not a block.