Share via


VisualBasicExtensions.IndexOf Method

Definition

Overloads

IndexOf(SyntaxTokenList, SyntaxKind)

Returns the index of the first token of a specified kind in the token list.

IndexOf(SyntaxTriviaList, SyntaxKind)

Returns the index of the first trivia of a specified kind in the trivia list.

IndexOf<TNode>(SeparatedSyntaxList<TNode>, SyntaxKind)

Returns the index of the first node of a specified kind in the node list.

IndexOf<TNode>(SyntaxList<TNode>, SyntaxKind)

Returns the index of the first node of a specified kind in the node list.

IndexOf(SyntaxTokenList, SyntaxKind)

Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb

Returns the index of the first token of a specified kind in the token list.

public:
[System::Runtime::CompilerServices::Extension]
 static int IndexOf(Microsoft::CodeAnalysis::SyntaxTokenList list, Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind);
public static int IndexOf (this Microsoft.CodeAnalysis.SyntaxTokenList list, Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind);
static member IndexOf : Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.VisualBasic.SyntaxKind -> int
<Extension()>
Public Function IndexOf (list As SyntaxTokenList, kind As SyntaxKind) As Integer

Parameters

list
SyntaxTokenList

Token list.

kind
SyntaxKind

The SyntaxKind to find.

Returns

Returns non-negative index if the list contains a token which matches kind, -1 otherwise.

Applies to

IndexOf(SyntaxTriviaList, SyntaxKind)

Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb

Returns the index of the first trivia of a specified kind in the trivia list.

public:
[System::Runtime::CompilerServices::Extension]
 static int IndexOf(Microsoft::CodeAnalysis::SyntaxTriviaList list, Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind);
public static int IndexOf (this Microsoft.CodeAnalysis.SyntaxTriviaList list, Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind);
static member IndexOf : Microsoft.CodeAnalysis.SyntaxTriviaList * Microsoft.CodeAnalysis.VisualBasic.SyntaxKind -> int
<Extension()>
Public Function IndexOf (list As SyntaxTriviaList, kind As SyntaxKind) As Integer

Parameters

list
SyntaxTriviaList

Trivia list.

kind
SyntaxKind

The SyntaxKind to find.

Returns

Returns non-negative index if the list contains a trivia which matches kind, -1 otherwise.

Applies to

IndexOf<TNode>(SeparatedSyntaxList<TNode>, SyntaxKind)

Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb

Returns the index of the first node of a specified kind in the node list.

public:
generic <typename TNode>
 where TNode : Microsoft::CodeAnalysis::SyntaxNode[System::Runtime::CompilerServices::Extension]
 static int IndexOf(Microsoft::CodeAnalysis::SeparatedSyntaxList<TNode> list, Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind);
public static int IndexOf<TNode> (this Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> list, Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member IndexOf : Microsoft.CodeAnalysis.SeparatedSyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Microsoft.CodeAnalysis.VisualBasic.SyntaxKind -> int (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function IndexOf(Of TNode As SyntaxNode) (list As SeparatedSyntaxList(Of TNode), kind As SyntaxKind) As Integer

Type Parameters

TNode

Parameters

list
SeparatedSyntaxList<TNode>

Node list.

kind
SyntaxKind

The SyntaxKind to find.

Returns

Returns non-negative index if the list contains a node which matches kind, -1 otherwise.

Applies to

IndexOf<TNode>(SyntaxList<TNode>, SyntaxKind)

Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb
Source:
VisualBasicExtensions.vb

Returns the index of the first node of a specified kind in the node list.

public:
generic <typename TNode>
 where TNode : Microsoft::CodeAnalysis::SyntaxNode[System::Runtime::CompilerServices::Extension]
 static int IndexOf(Microsoft::CodeAnalysis::SyntaxList<TNode> list, Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind);
public static int IndexOf<TNode> (this Microsoft.CodeAnalysis.SyntaxList<TNode> list, Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member IndexOf : Microsoft.CodeAnalysis.SyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Microsoft.CodeAnalysis.VisualBasic.SyntaxKind -> int (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function IndexOf(Of TNode As SyntaxNode) (list As SyntaxList(Of TNode), kind As SyntaxKind) As Integer

Type Parameters

TNode

Parameters

list
SyntaxList<TNode>

Node list.

kind
SyntaxKind

The SyntaxKind to find.

Returns

Returns non-negative index if the list contains a node which matches kind, -1 otherwise.

Applies to