Share via


SPDatabaseSequence.GetVersion method

Returns the associated database version based on the version ID. If no version associated with the version ID is found, this function will return defaultVersion.

Namespace:  Microsoft.SharePoint.Upgrade
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Protected Function GetVersion ( _
    id As Guid, _
    defaultVersion As Version _
) As Version
'Usage
Dim id As Guid
Dim defaultVersion As Version
Dim returnValue As Version

returnValue = Me.GetVersion(id, defaultVersion)
protected Version GetVersion(
    Guid id,
    Version defaultVersion
)

Parameters

  • id
    Type: System.Guid

    A GUID that specifies the version ID.

  • defaultVersion
    Type: System.Version

    A System.Version object that represents the default version.

Return value

Type: System.Version
A System.Version object that represents the version that is associated with the version ID.

Remarks

If no version associated with the version ID is found, this function will return defaultVersion.

See also

Reference

SPDatabaseSequence class

SPDatabaseSequence members

Microsoft.SharePoint.Upgrade namespace