This documentation is archived and is not being maintained.

PackWebRequest.ContentLength Property

Gets or sets the Content-length HTTP header.

Namespace: System.IO.Packaging
Assembly: PresentationCore (in presentationcore.dll)

public override long ContentLength { get; set; }
/** @property */
public long get_ContentLength ()

/** @property */
public void set_ContentLength (long value)

public override function get ContentLength () : long

public override function set ContentLength (value : long)

You cannot use this property in XAML.

Property Value

The content length, in bytes.

Exception typeCondition


Set is not supported, PackWebRequest is read-only.

Note that the pack URI protocol does not process information in the request other than the uniform resource identifier (URI). For most traditional purposes (such as estimating the size of POST information), there is no need for this property.

ContentLength returns zero (0) if the request resolves from the PackageStore cache.

The ContentLength property is shared with the inner WebRequest (GetInnerRequest).

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0