uri class : DnsSafeHost getter

Description

Gets an unescaped host name that is safe to use for DNS resolution.

Syntax

uriInstance.DnsSafeHost

Arguments

None.

Return value

ClassDescription
stringAn unescaped host name that is safe to use for DNS resolution.

Sample code

1:

uri u = new uri("http://www.example.com/aaa/bbb.html");

2:

string absolutePath = u.DnsSafeHost;

Notes

It's a wrapper of the System.Uri.DnsSafeHost property.

Links for reference

Copyright © Cooker All rights reserved.