CSharpExtensions.IndexOf Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
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::CSharp::SyntaxKind kind);
public static int IndexOf (this Microsoft.CodeAnalysis.SyntaxTokenList list, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind);
static member IndexOf : Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.CSharp.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:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
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::CSharp::SyntaxKind kind);
public static int IndexOf (this Microsoft.CodeAnalysis.SyntaxTriviaList list, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind);
static member IndexOf : Microsoft.CodeAnalysis.SyntaxTriviaList * Microsoft.CodeAnalysis.CSharp.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:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
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::CSharp::SyntaxKind kind);
public static int IndexOf<TNode> (this Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> list, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member IndexOf : Microsoft.CodeAnalysis.SeparatedSyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Microsoft.CodeAnalysis.CSharp.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
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:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
- Source:
- CSharpExtensions.cs
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::CSharp::SyntaxKind kind);
public static int IndexOf<TNode> (this Microsoft.CodeAnalysis.SyntaxList<TNode> list, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member IndexOf : Microsoft.CodeAnalysis.SyntaxList<'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)> * Microsoft.CodeAnalysis.CSharp.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.