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("myCache");
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);