Method Trim
Trim(Int32, Int32)
Trim an existing List so that it will contain only the specified range of elements.
Declaration
void Trim(int start, int end)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | start | Starting index. |
System.Int32 | end | Ending index. |
Examples
The following code sample shows how to trim a Distributed List from index 5 to 10.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedList";
IDistributedList<Product> list = cache.DataTypeManager.GetList<Product>(dataTypeName);
list.Trim(5, 10);