Back to Devexpress

IObjectSpace.SetTopReturnedObjectsCount(Object, Int32) Method

expressappframework-devexpress-dot-expressapp-dot-iobjectspace-dot-settopreturnedobjectscount-x28-system-dot-object-system-dot-int32-x29.md

latest2.2 KB
Original Source

IObjectSpace.SetTopReturnedObjectsCount(Object, Int32) Method

Returns the maximum number of objects to be retrieved by the specified collection from a data store.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
void SetTopReturnedObjectsCount(
    object collection,
    int topReturnedObjects
)
vb
Sub SetTopReturnedObjectsCount(
    collection As Object,
    topReturnedObjects As Integer
)

Parameters

NameTypeDescription
collectionObject

A collection from which a specific number of objects can be retrieved.

| | topReturnedObjects | Int32 |

An integer value specifying the maximum number of objects that can be retrieved from the database by the specified collection.

|

Remarks

The SetTopReturnedObjectsCount method sets the maximum number of objects that can be retrieved by the specified collection, if this collection type is supported by the current Object Space.

Below is an example of using this method:

csharp
IList objects = objectSpace.GetObjects(typeof(Product));
objectSpace.SetTopReturnedObjectsCount(objects, 500);

See Also

SetTopReturnedObjectsCount(Object, Int32)

IObjectSpace Interface

IObjectSpace Members

DevExpress.ExpressApp Namespace