Skip to main content

StatementSyntax Class Extensions

Extension MethodSummary
IsEmbedded(StatementSyntax, Boolean, Boolean, Boolean)Returns true if the specified statement is an embedded statement.
NextStatement(StatementSyntax)Gets the next statement of the specified statement. If the specified statement is not contained in the list, or if there is no next statement, then this method returns null.
PreviousStatement(StatementSyntax)Gets the previous statement of the specified statement. If the specified statement is not contained in the list, or if there is no previous statement, then this method returns null.
TryGetContainingList(StatementSyntax, SyntaxList<StatementSyntax>)Gets a list the specified statement is contained in. This method succeeds if the statement is in a block's statements or a switch section's statements.