Guest User

Guest User

  • Tech Writer
  • 357
  • 120.7k

Instantiation of a class to initialize fields...

Aug 28 2012 1:00 PM
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)