Partager via


AdoDotNetConnectionSupport.CompareVersions Method

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.AdoDotNet
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Déclaration
Public Overridable Function CompareVersions ( _
    versionA As String, _
    versionB As String _
) As Integer
public virtual int CompareVersions(
    string versionA,
    string versionB
)
public:
virtual int CompareVersions(
    String^ versionA, 
    String^ versionB
)
abstract CompareVersions : 
        versionA:string * 
        versionB:string -> int 
override CompareVersions : 
        versionA:string * 
        versionB:string -> int 
public function CompareVersions(
    versionA : String, 
    versionB : String
) : int

Parameters

  • versionA
    Type: System.String
    The first of two versions to compare.
  • versionB
    Type: System.String
    The second of two versions to compare.

Return Value

Type: System.Int32
Returns an integer specifying the following:

  1. Less than zero: versionA is less than versionB;

  2. Equal to zero: versionA is equal to versionB;

  3. Greater than zero: versionA is greater than versionB.

.NET Framework Security

See Also

Reference

AdoDotNetConnectionSupport Class

Microsoft.VisualStudio.Data.AdoDotNet Namespace