Method Dequeue
Dequeue()
Removes and returns the object at the beginning of the IQueue.
Declaration
T Dequeue()
Returns
Type | Description |
---|---|
T | The object that is removed from the beginning of the IQueue. |
Examples
The following code sample shows how to dequeue an object from distributed queue.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedQueue";
IDistributedQueue<Product> queue = cache.DataTypeManager.GetQueue<Product>(dataTypeName);
Product product = queue.Dequeue();