Redigeeri

Jagamisviis:


ObjectCache.Item[String] Property

Definition

Gets or sets the default indexer for the ObjectCache class.

public:
 abstract property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ key); void set(System::String ^ key, System::Object ^ value); };
public abstract object this[string key] { get; set; }
member this.Item(string) : obj with get, set
Default Public MustOverride Property Item(key As String) As Object

Parameters

key
String

A unique identifier for a cache entry in the cache.

Property Value

A key that serves as an indexer into the cache instance.

Remarks

The behavior of the set accessor of this property is like the Set(String, Object, DateTimeOffset, String) method. Internally, a cache implementation could set the absolute expiration of the specified value to the InfiniteAbsoluteExpiration method. However this behavior is ultimately up to the cache implementation.

The behavior of get accessor is like calling the Get(String) method and using null for the region name.

Applies to