Skip to main content

Windows Dev Center

HttpContentRangeHeaderValue class

Represents the value of the Content-Range HTTP header on HTTP content in a request or a response.

Syntax


var httpContentRangeHeaderValue = new Windows.Web.Http.Headers.HttpContentRangeHeaderValue(uInt64);
var httpContentRangeHeaderValue = new Windows.Web.Http.Headers.HttpContentRangeHeaderValue(uInt64, uInt64);
var httpContentRangeHeaderValue = new Windows.Web.Http.Headers.HttpContentRangeHeaderValue(uInt64, uInt64, uInt64);

public sealed class HttpContentRangeHeaderValue : IStringable

Public NotInheritable Class HttpContentRangeHeaderValue
    Implements IStringable

public ref class HttpContentRangeHeaderValue sealed : IStringable

Members

The HttpContentRangeHeaderValue class has these types of members:

Constructors

The HttpContentRangeHeaderValue class has these constructors.

ConstructorDescription
HttpContentRangeHeaderValue(UInt64) Initializes a new instance of the HttpContentRangeHeaderValue class with a content length.
HttpContentRangeHeaderValue(UInt64, UInt64) Initializes a new instance of the HttpContentRangeHeaderValue class with a start and stop position.
HttpContentRangeHeaderValue(UInt64, UInt64, UInt64) Initializes a new instance of the HttpContentRangeHeaderValue class with a start and stop position and a content length.

 

Methods

The HttpContentRangeHeaderValue class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Parse Converts a string to an HttpContentRangeHeaderValue instance.
ToString Returns a string that represents the current HttpContentRangeHeaderValue object.
TryParse Determines whether a string is valid HttpContentRangeHeaderValue information.

 

Properties

The HttpContentRangeHeaderValue class has these properties.

PropertyAccess typeDescription

FirstBytePosition

Read-onlyGets the position at which to start sending data in the Content-Range HTTP header.

LastBytePosition

Read-onlyGets the position at which to stop sending data in the Content-Range HTTP header.

Length

Read-onlyGets the length of the full content entity body in the Content-Range HTTP header.

Unit

Read/writeGets or sets the value of the range units used in the Content-Range HTTP header.

 

Remarks

The HttpContentRangeHeaderValue class represents the value of the Content-Range HTTP header on HTTP content sent in an HTTP request or received in an response.

The ContentRange property on the HttpContentHeaderCollection returns an HttpContentRangeHeaderValue object.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.winmd

Attributes

[ DualApiPartition()]
[ MarshalingBehavior(Agile)]
[ Threading(Both)]
[ Version(0x06030000)]

See also

ContentRange
HttpContentHeaderCollection
Object
IStringable