Hi
Given code like the following:-
URL info = new URL("http://www.domain.com:80/info/");
The string "http://www.domain.com:80/info/" I know would be stored in a field and then accessed via an auto property like so
var getHost = info.Host; // www.domain.com
But how would the property "Host" or more importantly the underlining field split the string. I assume the logic to do this would be in the property itself?
Regards
Steven
Loading
VulpesPosted Aug 28, 2012, 1:54 PM
A possible alternative would be for the constructor to split out all components of the url and save them in individual fields. However, this would increase the memory footprint of the URL class considerably and so I think most library writers would prefer to split out these components as needed and take a small performance hit if they need to split them out more than once.
VulpesPosted Aug 28, 2012, 2:45 PM
Guest UserPosted Aug 28, 2012, 2:14 PM