Jaa


DataCache.Item Property

Allows for the use of array notation to access cached objects.

Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Client (in microsoft.applicationserver.caching.client.dll)

Usage

'Usage
Dim instance As DataCache
Dim key As String
Dim value As Object

value = instance(key)

instance(key) = value

Syntax

'Declaration
Public Default Property Item ( _
    key As String _
) As Object
public Object this [
    string key
] { get; set; }
public:
property Object^ default [String^] {
    Object^ get (String^ key);
    void set (String^ key, Object^ value);
}
/** @property */
public Object get_Item (String key)

/** @property */
public void set_Item (String key, Object value)

Parameters

  • key
    The key that is used to save the cached object.

Property Value

A deserialized object that was saved to the cache cluster that uses the key.

Remarks

This method enables array notation. For more information about how to use the Item method, see the how to topics in Using Basic Cache Methods.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Visual Studio 2010 and later, .NET Framework 4

Target Platforms

Windows 7; Windows Server 2008 R2; Windows Server 2008 Service Pack 2; Windows Vista Service Pack 2

See Also

Reference

DataCache Class
DataCache Members
Microsoft.ApplicationServer.Caching Namespace

  ff425062(v=azure.10).md 2011-08-26