Mono Class Library: System.Uri Overview | Members

System.Uri.CheckHostName Method

Returns a value that describes the format of a host name string. [Edit]

public static UriHostNameType CheckHostName (string name)

Parameters

name
A string containing the host name to validate. [Edit]

Returns

A UriHostNameType that indicates the type of the host name. If the type of the host name cannot be determined, or the host name is null or a zero-length string, returns UriHostNameType.Unknown . [Edit]

Remarks

Documentation for this section has not yet been entered. [Edit]

Example

The following example demonstrates using the Uri.CheckHostName(string) method.

C# Example
using System;

public class UriTest {
 public static void Main() {
 
 Console.WriteLine(Uri.CheckHostName("www.contoso.com"));
 }
}

The output is

Dns

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0