Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

confused.

Status
Not open for further replies.

JABOSL

Programmer
Jan 25, 2006
35
Can someone tell me exactly what these lines do?

Dim REQUEST As Net.HttpWebRequest
REQUEST.Timeout = 60000
REQUEST = Net.HttpWebRequest.Create(URL)

in line 1 you are saying request will be an instance of net.httpwebrequest.

in line 2 you are setting the timeout value of? The class httpwebrequest? or the instance of httpwebrequest?

is line 1 like saying x will be an integer and line 3 like saying x = 3? If so I guess line 2 is setting the property of the class timeout to 60000 which must be able to be done before a real object is created. Well, when is the object created? Line 1 or 3?
 
the object is created in line 1 but not instantiated you just tell it to be of type httpwebrequest. and then you create or fill it with a nonnull value in line 3 so it could be line 2 gets overriden in line 3.

Christiaan Baes
Belgium

"My new site" - Me
 
So it'd be poor practice to have REQUEST.Timeout=60000 between creation and instantiation, right? put line 2 after line 3.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top