Arrays

An Array is a collection of items that you can access via a long-typed index. You can read/write individual array item, and you can iterate through the array just as operating a local array.

Basics

To allocate a cache-based, 1000-item integer array with name "my_array":
CachedArray<int> array = new CachedArray<int>("my_array", 1000);

To read/write a single array element:
array[8] = 18;

Remarks

  • To allocate an array that is backed up by Windows Azure Table Storage, use:
TableStorageArray<int> array = new TableStorageArray<int>("demoarray", 1000, "[Your storage connection string]");
  • To allocate an array that is backed by both Windows Azure Cache and Windows Azure Table Storage, use:
Array<double> array = new Array<double>("myarray", 1000, "[Your storage connection string]");
  • To allocate arrays backed by other backend combinations, please see Data Providers.

Last edited Nov 4, 2013 at 1:02 AM by Haishi, version 5