Mono Class Library: System.Net.HttpWebRequest Overview | Members

System.Net.HttpWebRequest.AddRange Method

Adds a HTTP Range header to the current instance for a specified range. [Edit]

public void AddRange (string rangeSpecifier, int from, int to)

Parameters

rangeSpecifier
A string that contains the description of the range. [Edit]
from
A int designating the position at which to start sending data. [Edit]
to
A int designating the position at which to stop sending data. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionrangeSpecifier is null. [Edit]
ArgumentOutOfRangeException

from < 0.

-or-

to < 0.

-or-

from > to .

[Edit]
ArgumentExceptionrangeSpecifier is invalid. [Edit]
InvalidOperationExceptionThe range header could not be added. [Edit]

Remarks

Note:

The HTTP Range header specifies either a single range of bytes or a set of byte ranges in an entity-body to be returned. If the server accessed by the current instance supports the use of this header, this allows for the partial retrieval of the entity due to, for example, the entity being particularly large or there having been a failed transfer of data.

For more information on the HTTP Range header, see Section 14.35 of IETF RFC 2616.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0