3
Answers

Instantiation of a class to initialize fields...

S

S

12y
1.3k
1
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
Answers (3)