WebRequest Constructor
Collapse the table of content
Expand the table of content

WebRequest Constructor ()


Initializes a new instance of the WebRequest class.

Namespace:   System.Net
Assembly:  System (in System.dll)

protected WebRequest()

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

Legacy Code Example

The following example shows how to create a WebRequest instance by calling the Create method on the WebRequest class.

WebRequest myRequest = WebRequest.Create("http://www.contoso.com");

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft