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
'宣言
Public Overridable Function Compare ( _
versionA As String, _
versionB As String _
) As Integer
'使用
Dim instance As DataSourceVersionComparer
Dim versionA As String
Dim versionB As String
Dim returnValue As Integer
returnValue = instance.Compare(versionA, _
versionB)
public virtual int Compare(
string versionA,
string versionB
)
public:
virtual int Compare(
String^ versionA,
String^ versionB
)
public function Compare(
versionA : String,
versionB : String
) : int
Parameters
versionA
Type: System.StringThe first version number to compare.
versionB
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.
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