Click or drag to resize

SyntaxNodeGetText Method

Gets the full text of this node as an new SourceText instance.

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
public SourceText GetText(
	Encoding encoding = null,
	SourceHashAlgorithm checksumAlgorithm = 1


encoding (Optional)
Type: System.TextEncoding
Encoding of the file that the text was read from or is going to be saved to. null if the encoding is unspecified. If the encoding is not specified the SourceText isn't debuggable. If an encoding-less SourceText is written to a file a UTF8 shall be used as a default.
checksumAlgorithm (Optional)
Type: Microsoft.CodeAnalysis.TextSourceHashAlgorithm
Hash algorithm to use to calculate checksum of the text that's saved to PDB.

Return Value

Type: SourceText
ArgumentExceptionchecksumAlgorithm is not supported.
See Also