CompletionSet.CompareItems Method
Compares two strings for the specified number of characters.
Namespace: Microsoft.VisualStudio.Package
Assemblies: 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
声明
Public Overridable Function CompareItems ( _
bstrSoFar As String, _
bstrOther As String, _
lCharactersToCompare As Integer, _
<OutAttribute> ByRef plResult As Integer _
) As Integer
用法
Dim instance As CompletionSet
Dim bstrSoFar As String
Dim bstrOther As String
Dim lCharactersToCompare As Integer
Dim plResult As Integer
Dim returnValue As Integer
returnValue = instance.CompareItems(bstrSoFar, _
bstrOther, lCharactersToCompare, _
plResult)
public virtual int CompareItems(
string bstrSoFar,
string bstrOther,
int lCharactersToCompare,
out int plResult
)
public:
virtual int CompareItems(
String^ bstrSoFar,
String^ bstrOther,
int lCharactersToCompare,
[OutAttribute] int% plResult
)
abstract CompareItems :
bstrSoFar:string *
bstrOther:string *
lCharactersToCompare:int *
plResult:int byref -> int
override CompareItems :
bstrSoFar:string *
bstrOther:string *
lCharactersToCompare:int *
plResult:int byref -> int
public function CompareItems(
bstrSoFar : String,
bstrOther : String,
lCharactersToCompare : int,
plResult : int
) : int
Parameters
- bstrSoFar
Type: System.String
The first string to compare.
- bstrOther
Type: System.String
The second string to compare.
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.