共用方式為


SPFile.ReleaseLock Method

Releases an existing lock that is specified by its identifier (ID).

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub ReleaseLock ( _
    lockId As String _
)
'Usage
Dim instance As SPFile
Dim lockId As String

instance.ReleaseLock(lockId)
public void ReleaseLock(
    string lockId
)

Parameters

  • lockId
    Type: System.String

    The ID of the existing lock on the file.

Exceptions

Exception Condition
SPException

An error occurred while releasing the lock.

See Also

Reference

SPFile Class

SPFile Members

Microsoft.SharePoint Namespace

RefreshLock(String, TimeSpan)