Method InsertAtHead
InsertAtHead(T)
Insert the specified value at the head of the List.
Declaration
void InsertAtHead(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | Element to insert in the List. |
Examples
The following code sample shows how to insert element at start of the Distributed List.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedList";
IDistributedList<Product> list = cache.DataTypeManager.GetList<Product>(dataTypeName);
// Get new product
Product newProduct = FetchNewProduct();
list.InsertAtHead(newProduct);