NAnt SDK Documentation - v0.92

DnsFunctions.GetHostName Method 

Gets the host name of the local computer.

[Visual Basic]
<Function(Name:="get-host-name")>
Public Shared Function GetHostName() As String
[C#]
[Function(Name="get-host-name")]
public static string GetHostName();

Return Value

A string that contains the DNS host name of the local computer.

Exceptions

Exception Type Condition
SocketException An error is encountered when resolving the local host name.

See Also

DnsFunctions Class | NAnt.Core.Functions Namespace