Click or drag to resize

SymbolDisplayToDisplayParts Method



Convert a symbol to an array of string parts, each of which has a kind. Useful for colorizing the display string.

Namespace:  Microsoft.CodeAnalysis.CSharp
Assembly:  Microsoft.CodeAnalysis.CSharp (in Microsoft.CodeAnalysis.CSharp.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public static ImmutableArray<SymbolDisplayPart> ToDisplayParts(
	ISymbol symbol,
	SymbolDisplayFormat format = null
)

Parameters

symbol
Type: Microsoft.CodeAnalysisISymbol
The symbol to be displayed.
format (Optional)
Type: Microsoft.CodeAnalysisSymbolDisplayFormat
The formatting options to apply. If null is passed, CSharpErrorMessageFormat will be used.

Return Value

Type: ImmutableArraySymbolDisplayPart
A list of display parts.
Remarks
Parts are not localized until they are converted to strings.
See Also