Delen via


SyntaxNodeOrTokenList.Replace(SyntaxNodeOrToken, SyntaxNodeOrToken) Method

Definition

Creates a new SyntaxNodeOrTokenList with the specified element replaced with a new node or token.

public:
 Microsoft::CodeAnalysis::SyntaxNodeOrTokenList Replace(Microsoft::CodeAnalysis::SyntaxNodeOrToken nodeOrTokenInList, Microsoft::CodeAnalysis::SyntaxNodeOrToken newNodeOrToken);
public Microsoft.CodeAnalysis.SyntaxNodeOrTokenList Replace (Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrTokenInList, Microsoft.CodeAnalysis.SyntaxNodeOrToken newNodeOrToken);
member this.Replace : Microsoft.CodeAnalysis.SyntaxNodeOrToken * Microsoft.CodeAnalysis.SyntaxNodeOrToken -> Microsoft.CodeAnalysis.SyntaxNodeOrTokenList
Public Function Replace (nodeOrTokenInList As SyntaxNodeOrToken, newNodeOrToken As SyntaxNodeOrToken) As SyntaxNodeOrTokenList

Parameters

nodeOrTokenInList
SyntaxNodeOrToken

The element to replace.

newNodeOrToken
SyntaxNodeOrToken

The new node or token.

Returns

Applies to