SyntaxFacts Class
Answers questions about a SyntaxKind that do not need a node to ask them of.
public static class SyntaxFactsMethods
| Name | Description |
|---|---|
| GetText(SyntaxKind) | Returns the text a kind is always spelled with, or an empty string when its text varies. |
| IsComment(SyntaxKind) | Determines whether kind is one of the comment trivia kinds. |
| IsTrivia(SyntaxKind) | Determines whether kind is whitespace, a line break, or a comment. |
GetText(SyntaxKind)
SyntaxFacts.csReturns the text a kind is always spelled with, or an empty string when its text varies.
public static string GetText(SyntaxKind kind)IsComment(SyntaxKind)
SyntaxFacts.csDetermines whether kind is one of the comment trivia kinds.
public static bool IsComment(SyntaxKind kind)IsTrivia(SyntaxKind)
SyntaxFacts.csDetermines whether kind is whitespace, a line break, or a comment.
public static bool IsTrivia(SyntaxKind kind)