Freigeben über


CompletionSet.CompareItems Method

Compares two strings for the specified number of characters.

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

Syntax

'Declaration
Public Overridable Function CompareItems ( _
    bstrSoFar As String, _
    bstrOther As String, _
    lCharactersToCompare As Integer, _
    <OutAttribute> ByRef plResult As Integer _
) As Integer
public virtual int CompareItems(
    string bstrSoFar,
    string bstrOther,
    int lCharactersToCompare,
    out int plResult
)

Parameters

  • lCharactersToCompare
    Type: System.Int32
    The number of characters to compare.
  • plResult
    Type: System.Int32%
    [out] The result of the comparison.

Return Value

Type: System.Int32
If the method is successful, returns S_OK; otherwise, returns an error code (in which case the default comparison is used).

Implements

IVsCompletionSetEx.CompareItems(String, String, Int32, Int32%)

Remarks

The plResult should be returned as follows: if bstrSoFar comes before bstrOther, plResult < 0. If bstrSoFar is equivalent to bstrOther, plResult is 0. If bstrSoFar comes after bstrOther, plResult > 0.

This method is the implementation of the CompareItems method of the IVsCompletionSetEx interface.

By default this method is not implemented and returns plResult as 0 and E_NOTIMPL.

.NET Framework Security

See Also

Reference

CompletionSet Class

Microsoft.VisualStudio.Package Namespace