Open sandboxFocus

Method AddDefault

AddDefault(IStatementList, bool)

Add a default switch section. This overload accepts an IStatementList.

Declaration
public void AddDefault(IStatementList statements, bool appendBreak = true)
Parameters
Type Name Description
IStatementList statements

The statements to execute.

bool appendBreak

Value indicating whether a break; statement should be appended to statements. The default value is true.

AddDefault(IStatement, bool)

Add a default switch section. This overload accepts an IStatement.

Declaration
public void AddDefault(IStatement statement, bool appendBreak = true)
Parameters
Type Name Description
IStatement statement

The statements to execute. To call a template, see FromTemplate(TemplateInvocation, object?).

bool appendBreak

Value indicating whether a break; statement should be appended to statement. The default value is true.