Share via


ListItem.File property

Gets the file that is represented by the item from a document library.

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

Syntax

'Declaration
Public ReadOnly Property File As File
    Get
'Usage
Dim instance As ListItem
Dim value As File

value = instance.File
public File File { get; }

Property value

Type: Microsoft.SharePoint.Client.File
A File object that represents the file. If the item does not exist, if the item is a folder, or if the item is not located in a document library, the File property returns an Object whose ServerObjectIsNull property is true.

Remarks

It must be a null reference (Nothing in Visual Basic) if the parent list is not a document library or FileSystemObjectType is Folder.

See also

Reference

ListItem class

ListItem members

Microsoft.SharePoint.Client namespace