This documentation is archived and is not being maintained.

HttpWebRequest.AddRange Method (Int32)

.NET Framework 1.1

Adds a byte range header to a request for a specific range from the beginning or end of the requested data.

[Visual Basic]
Overloads Public Sub AddRange( _
   ByVal range As Integer _
public void AddRange(
 int range
public: void AddRange(
 int range
public function AddRange(
   range : int


The starting or ending point of the range.


Exception Type Condition
ArgumentException rangeSpecifier is invalid.
InvalidOperationException The range header could not be added.


AddRange adds a byte range header to the request.

If range is positive, the range is from the start of the data to range.

If range is negative, the range is from range to the end of the data.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

HttpWebRequest Class | HttpWebRequest Members | System.Net Namespace | HttpWebRequest.AddRange Overload List