SPSite.LockIssue 属性

Gets or sets the comment that is used in locking a site collection.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Property LockIssue As String
    Get
    Set
用法
Dim instance As SPSite
Dim value As String

value = instance.LockIssue

instance.LockIssue = value
public string LockIssue { get; set; }

属性值

类型:System.String
A string that contains the comment.

示例

The following code example uses the LockIssue property to explain why a specified site collection is being write-locked.

Using oSiteCollection As New SPSite("http://Site_Name")
    oSiteCollection.WriteLocked = True
    oSiteCollection.ReadLocked = False
    oSiteCollection.LockIssue = "Customer did not pay bill."
End Using
using (SPSite oSiteCollection = new SPSite("http://Site_Name"))
{
    oSiteCollection.WriteLocked = true;
    oSiteCollection.ReadLocked  = false;
    oSiteCollection.LockIssue   = "Customer did not pay bill.";
}

备注

Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

另请参阅

引用

SPSite 类

SPSite 成员

Microsoft.SharePoint 命名空间