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

Method GetValue

GetValue<T>()

Returns the value stored in the cache item.

Declaration
public T GetValue<T>()
Returns
Type Description
T

Value of the cache item with the type defined.

Type Parameters
Name Description
T

Specifies the type of value obtained from the cache item.

Remarks

This value must be serializable, otherwise System.ArgumentException is thrown when you will try to add or insert the CacheItem.

Examples

Example gets value of a cache item

CacheItem item = cache.GetCacheItem("Product0");

Product product = item.GetValue<Product>();
Back to top Copyright © 2017 Alachisoft