SPDatabaseSnapshotCollection.Count property
Gets the total number of database snapshots of the database.
Namespace: Microsoft.SharePoint.Administration.Backup
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public ReadOnly Property Count As Integer
Get
'Usage
Dim instance As SPDatabaseSnapshotCollection
Dim value As Integer
value = instance.Count
public int Count { get; }
Property value
Type: System.Int32
The number of database snapshots.
Remarks
Count can return 0, but it never returns a a null reference (Nothing in Visual Basic) reference.
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.
See also
Reference
SPDatabaseSnapshotCollection class