IBackupRestore.Id Property

Gets or sets an ID for the content component.

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


Property Id As Guid
Dim instance As IBackupRestore
Dim value As Guid

value = instance.Id

instance.Id = value
Guid Id { get; set; }

Property Value

Type: System.Guid
A Guid that identifies the content component that is represented by the IBackupRestore object.


If your class derives from SPPersistedObject, do not implement this member.

In most cases, you implement the Id property by creating a private field for the name value and implement the public property as a wrapper around the field. Consider having the get accessor create a value, if the property has not previously been set. See the example.


The following example code shows an implementation for the Id property that ensures that it will always return a valid Guid.

private Guid id;
public Guid Id
        if (id == Guid.Empty)
            id = Guid.NewGuid;
    return id;
set {id = value;}
Private _id As Guid
Public Property Id() As Guid
        If id = Guid.Empty Then
            id = Guid.NewGuid
        End If
    Return id
End Get
Set(ByVal value As Guid)
    id = value
End Set
End Property

See Also


IBackupRestore Interface

IBackupRestore Members

Microsoft.SharePoint.Administration.Backup Namespace