Mono Class Library: Mono.Unix.UnixEnvironment Overview | Members

Mono.Unix.UnixEnvironment.MachineName Property

Gets or sets the machine name of the machine the process is running on. [Edit]

public static string MachineName { set; get; }

See Also

Mono.Unix.Native.Syscall.gethostname
Mono.Unix.Native.Syscall.sethostname

Value

A string containing the machine name. [Edit]

Exceptions

TypeReason
InvalidOperationException The caller tried to set the host name and was not the super-user. [Mono.Unix.Native.Errno.EPERM] [Edit]

Remarks

Only the super-user can change the machine name. [Edit]

Requirements

Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0