Delen via


ITypeSymbol.ToMinimalDisplayString Method

Definition

Converts a symbol to a string that can be displayed to the user. May be tailored to a specific location in the source code.

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

Parameters

semanticModel
SemanticModel

Binding information (for determining names appropriate to the context).

topLevelNullability
NullableFlowState

The top-level nullability to use for formatting.

position
Int32

A position in the source code (context).

format
SymbolDisplayFormat

Formatting rules - null implies MinimallyQualifiedFormat

Returns

A formatted string that can be displayed to the user.

Applies to