Export (0) Print
Expand All

MemoryResponseElement.Length Property

Gets the size of the array that is referenced by the Buffer property.

Namespace:  System.Web.Caching
Assembly:  System.Web (in System.Web.dll)

public long Length { get; }

Property Value

Type: System.Int64
The size of the array.

A MemoryResponseElement object that is created by ASP.NET is a fixed-size memory buffer that is created from a pool of memory buffers. As a result, the contents of a MemoryResponseElement object often do not completely fill the Buffer array. Typically only a part of the Buffer array will contain response data. Therefore, providers that serialize the Buffer array directly (instead of serializing the complete type that is being stored in the output cache) must use the Length property to determine how much of the Buffer array must be stored.

.NET Framework

Supported in: 4.6, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft