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("myCache");
string dataTypeName = "DistributedList";
IDistributedList<Product> list = cache.DataTypeManager.GetList<Product>(dataTypeName);
// Get new product
Product newProduct = FetchNewProduct();
list.InsertAtHead(newProduct);