Method Contains
Contains(T)
Determines whether the element exists in IQueue.
Declaration
bool Contains(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to locate. |
Returns
Type | Description |
---|---|
System.Boolean | True, if found in the IQueue otherwise; false. |
Examples
The following code sample shows how to check whether the element exists in Distributed Queue.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedQueue";
IDistributedQueue<Product> queue = cache.DataTypeManager.GetQueue<Product>(dataTypeName);
Product product = new Product();
product.Id = 1;
product.Name = "Chai";
bool result = queue.Contains(product);