• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try NCache Live
Show / Hide Table of Contents

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);
Back to top Copyright © 2017 Alachisoft