Click or drag to resize

CSharpExtensionsAny Method (SyntaxTokenList, SyntaxKind)



Tests whether a list contains a token of a particular kind.

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis.CSharp (in Microsoft.CodeAnalysis.CSharp.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public static bool Any(
	this SyntaxTokenList list,
	SyntaxKind kind
)

Parameters

list
Type: Microsoft.CodeAnalysisSyntaxTokenList
kind
Type: Microsoft.CodeAnalysis.CSharpSyntaxKind
The SyntaxKind to test for.

Return Value

Type: Boolean
Returns true if the list contains a token which matches kind

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SyntaxTokenList. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also