Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AddRange Method (String, Int32, Int32)

HttpWebRequest.AddRange Method (String, Int32, Int32)

.NET Framework 1.1

Adds a range header to a request for a specified range.

[Visual Basic]
Overloads Public Sub AddRange( _
   ByVal rangeSpecifier As String, _
   ByVal from As Integer, _
   ByVal to As Integer _
public void AddRange(
 string rangeSpecifier,
 int from,
 int to
public: void AddRange(
 String* rangeSpecifier,
 int from,
 int to
public function AddRange(
   rangeSpecifier : String,
 from : int,
 to : int


The description of the range.
The position at which to start sending data.
The position at which to stop sending data.


Exception Type Condition
ArgumentNullException rangeSpecifier is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeException from is greater than to


from or to is less than 0.

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


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

© 2015 Microsoft