SymbolDisplay.ToMinimalDisplayString Method

Definition

Displays a symbol in the Visual Basic style, based on a SymbolDisplayFormat. Based on the context, qualify type And member names as little as possible without introducing ambiguities.

public static string ToMinimalDisplayString (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.SymbolDisplayFormat format = default);
static member ToMinimalDisplayString : Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.SemanticModel * int * Microsoft.CodeAnalysis.SymbolDisplayFormat -> string
Public Function ToMinimalDisplayString (symbol As ISymbol, semanticModel As SemanticModel, position As Integer, Optional format As SymbolDisplayFormat = Nothing) As String

Parameters

symbol
ISymbol

The symbol to be displayed.

semanticModel
SemanticModel

Semantic information about the context in which the symbol is being displayed.

position
Int32

A position within the SyntaxTree Or semanticModel.

format
SymbolDisplayFormat

The formatting options to apply. If null is passed, CSharpErrorMessageFormat will be used.

Returns

A formatted string that can be displayed to the user.

Remarks

The return value is not expected to be syntactically valid Visual Basic.

Applies to