SPFile.InDocumentLibrary property

Gets a Boolean value that indicates whether the file belongs to a document library.

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

public bool InDocumentLibrary { get; }

Property value

Type: System.Boolean
true if the file belongs to a document library; otherwise, false.
Show: