Compartilhar via


CheckIn Method

The CheckIn method of the SPFile class checks in the file to a document library.

Parameters

comment   A string that contains a comment regarding the check in.

Remarks

Although a check-in comment is not required in the user interface, the CheckIn method requires a comment as its parameter.

If versioning is enabled for the document library that contains the file, calling the CheckIn method creates an SPFileVersion object.

Example

The following code example checks files back into the Shared Documents document library of a subsite if the specified user is the one who checked them out.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security