Method GetRange
GetRange(Int32, Int32)
Returns a List that will contain only the specified range of elements specified.
Declaration
IList<T> GetRange(int start, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | start | Starting index. |
| System.Int32 | count | Number of items. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IList<T> |
Examples
The following code sample shows how to get range of specified items form Distributed List.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedList";
IDistributedList<Product> list = cache.DataTypeManager.GetList<Product>(dataTypeName);
IList<Product> subList = list.GetRange(25, 50);