Share via


Declarations.GetName Method

When implemented in a derived class, gets the name or text to be inserted for the specified item.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.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)

Syntax

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

Parameters

  • index
    Type: System.Int32

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

Return Value

Type: System.String
If successful, returns the name of the item; otherwise, returns nulla null reference (Nothing in Visual Basic).

Remarks

The name of the item is what is searched for as the user types characters and is what is inserted into the source when the user types a completion character. The name is not necessarily the same as what is displayed in the list. However, the name is what is searched on when the GetBestMatch method is called so the displayed text should at the very least contain the name of the item.

.NET Framework Security

See Also

Reference

Declarations Class

Microsoft.VisualStudio.Package Namespace