.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

XPBaseCollection.Count Property

Gets the number of elements contained in the XPBaseCollection instance.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.1.dll

Declaration

[Browsable(false)]
public int Count { get; }

Property Value

Type Description
Int32

The number of elements contained in the collection

Remarks

If the XPBaseCollection.LoadingEnabled property is set to true the collection is populated with data when the collection’s contents is accessed for the first time. So if the collection has never been accessed so far, reading the Count property will firstly load the data from a data store and then return the number of objects loaded. Note that when an XPCollection is created using a constructor with the criteriaEvaluationBehavior parameter, it is loaded immediately.

See Also