Compartilhar via


Declarations.GetDisplayText Method

When implemented in a derived class, gets the text to be displayed in the completion list for the specified item.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Declaration
Public MustOverride Function GetDisplayText ( _
    index As Integer _
) As String
public abstract string GetDisplayText(
    int index
)
public:
virtual String^ GetDisplayText(
    int index
) abstract
abstract GetDisplayText : 
        index:int -> string
public abstract function GetDisplayText(
    index : int
) : String

Parameters

  • index
    Type: Int32

    [in] The index of the item for which to get the display text.

Return Value

Type: String
The text to be displayed, otherwise nulla null reference (Nothing in Visual Basic).

Remarks

The display text is shown in the list but it is the value returned from the GetName method that is inserted. It is also the value returned from GetName that is used in finding the best match. This allows the display text, for example, to include adornments such as surrounding "<" and ">" characters or show decorated names as used in C++.

.NET Framework Security

See Also

Reference

Declarations Class

Microsoft.VisualStudio.Package Namespace