How to: Typecast a WebRequest to Access Protocol Specific Properties

 

This example shows how to typecast a WebRequest so that you can access protocol specific properties.

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

Programming Pluggable Protocols

Show: