This documentation is archived and is not being maintained.

WebRequest Constructor ()

.NET Framework 1.1

Initializes a new instance of the WebRequest class.

[Visual Basic]
Protected Sub New()
protected WebRequest();
protected: WebRequest();
protected function WebRequest();


Use the Create method to initialize new WebRequest instances. Do not use the constructor.


[Visual Basic, C#, C++] The following example shows how to create a WebRequest instance by calling the Create method on the WebRequest class.

[Visual Basic] 
Dim myRequest As WebRequest = WebRequest.Create("")

WebRequest myRequest = WebRequest.Create("");

WebRequest* myRequest = WebRequest::Create(S"");

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


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

WebRequest Class | WebRequest Members | System.Net Namespace | WebRequest Constructor Overload List