• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Method ToArray

ToArray()

Copies the IQueue elements to a new array.

Declaration
T[] ToArray()
Returns
Type Description
T[]

A new array containing elements copied from the IQueue.

Examples

The following code sample shows how to copy a Queue into a one-dimensional array.

ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedQueue";

IDistributedQueue<Product> queue = cache.DataTypeManager.GetQueue<Product>(dataTypeName);

Product[] products = queue.ToArray();
Back to top Copyright © 2017 Alachisoft