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)

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.

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

Show: