Compares two data-source version strings and returns a value indicating whether one is less than, equal to, or greater than the other.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'宣言
Private Function Compare ( _
x As String, _
y As String _
) As Integer Implements IComparer(Of String).Compare
'使用
Dim instance As DataSourceVersionComparer
Dim x As String
Dim y As String
Dim returnValue As Integer
returnValue = CType(instance, IComparer(Of String)).Compare(x, _
y)
int IComparer<string>.Compare(
string x,
string y
)
private:
virtual int Compare(
String^ x,
String^ y
) sealed = IComparer<String^>::Compare
JScript does not support explicit interface implementations.
Parameters
x
Type: System.StringThe first version number to compare.
y
Type: System.StringThe second version number to compare.
Return Value
Type: System.Int32
Returns one of three integer values:
Less than zero: versionA is less than versionB.
Equal to zero: versionA equals versionB.
Greater than zero: versionA is greater than versionB.
Implements
Permissions
- 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.
See Also
Reference
DataSourceVersionComparer Class