This documentation is archived and is not being maintained.

HttpWebRequest.AddRange Method (String, Int32)

.NET Framework 1.1

Adds a 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 rangeSpecifier As String, _
   ByVal range As Integer _
public void AddRange(
 string rangeSpecifier,
 int range
public: void AddRange(
 String* rangeSpecifier,
 int range
public function AddRange(
   rangeSpecifier : String,
 range : int


The description of the range.
The starting or ending point of the range.


Exception Type Condition
ArgumentNullException rangeSpecifier is a null reference (Nothing in Visual Basic).
ArgumentException rangeSpecifier is invalid.
InvalidOperationException The range header could not be added.


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