次の方法で共有


SPFile.CheckOut method (SPFile.SPCheckOutType, String)

Checks out the file from a document library by specifying the type of checkout and by specifying that the file should not be checked out if it has been modified after a particular date.

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

Syntax

'Declaration
Public Sub CheckOut ( _
    checkOutType As SPFile.SPCheckOutType, _
    lastModifiedDate As String _
)
'Usage
Dim instance As SPFile
Dim checkOutType As SPFile.SPCheckOutType
Dim lastModifiedDate As String

instance.CheckOut(checkOutType, lastModifiedDate)
public void CheckOut(
    SPFile.SPCheckOutType checkOutType,
    string lastModifiedDate
)

Parameters

  • lastModifiedDate
    Type: System.String

    The date when the file was last modified; can be a null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
SPFileCheckOutException

checkOutType is None.

SpException

The lastModifiedDate parameter is not null and the value does not match the value of the TimeLastModified property, which is when the file was last modified.

-or-

An error occurred while checking out the file.

See also

Reference

SPFile class

SPFile members

CheckOut overload

Microsoft.SharePoint namespace