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 _
)
[C#]
public void AddRange(
 string rangeSpecifier,
 int from,
 int to
);
[C++]
public: void AddRange(
 String* rangeSpecifier,
 int from,
 int to
);
[JScript]
public function AddRange(
   rangeSpecifier : String,
 from : int,
 to : int
);

Parameters

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

Exceptions

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

-or-

from or to is less than 0.

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

Requirements

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

Show:
© 2015 Microsoft