SPListItemCollection.Count property

Gets the number of list items in the collection, excluding folders.

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

Syntax

'Declaration
Public Overrides ReadOnly Property Count As Integer
    Get
'Usage
Dim instance As SPListItemCollection
Dim value As Integer

value = instance.Count
public override int Count { get; }

Property value

Type: System.Int32
A 32-bit integer that indicates the number of list items, excluding folders.

Implements

ICollection.Count

Remarks

The value of the ItemCount property of the SPList class includes folders and files within subfolders.

See also

Reference

SPListItemCollection class

SPListItemCollection members

Microsoft.SharePoint namespace