Share via


ListItem.File Property

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

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
Public ReadOnly Property File As File
    Get
'Usage
Dim instance As ListItem
Dim value As File

value = instance.File
[RemoteAttribute]
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