Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
checkOutType
Type: Microsoft.SharePoint.SPFile.SPCheckOutTypeOne of the enumeration values that specifies the type of checkout.
lastModifiedDate
Type: System.StringThe 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. |