Share via


SPDatabaseSnapshotCollection.Item property (Int32)

Gets the database snapshot at the specified indexed location in the collection of database snapshots.

Namespace:  Microsoft.SharePoint.Administration.Backup
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public ReadOnly Property Item ( _
    index As Integer _
) As SPDatabaseSnapshot
    Get
'Usage
Dim instance As SPDatabaseSnapshotCollection
Dim index As Integer
Dim value As SPDatabaseSnapshot

value = instance.Item(index)
public SPDatabaseSnapshot this[
    int index
] { get; }

Parameters

Property value

Type: Microsoft.SharePoint.Administration.Backup.SPDatabaseSnapshot
The database snapshot at the specified position in the collection of database snapshots.

Remarks

Warning

Database snapshots are typically created and deleted automatically by timer jobs in the background. To help ensure that the SPDatabaseSnapshotCollection object represents the current set of database snapshots, always call the RefreshSnapshots() method before you access or process any members of the collection. This point applies also when you access a database snapshot through an indexer. For example, if spd is an SPDatabase object, the line spd.Snapshots[0] should be preceded by a call of the RefreshSnapshots() method.

See also

Reference

SPDatabaseSnapshotCollection class

SPDatabaseSnapshotCollection members

Item overload

Microsoft.SharePoint.Administration.Backup namespace