WebApplicationInformation.MachineName Eigenschaft

Definition

Ruft den Namen des Anwendungscomputers ab.

public:
 property System::String ^ MachineName { System::String ^ get(); };
public string MachineName { get; }
member this.MachineName : string
Public ReadOnly Property MachineName As String

Eigenschaftswert

Der Name des Computers, auf dem die Anwendung ausgeführt wird.

Beispiele

Das folgende Codebeispiel zeigt, wie der Computername erhalten wird.

public string GetApplicationMachineName()
{
    // Get the name of the application machine name.
    return (string.Format(
        "Application machine name: {0}",
        ApplicationInformation.MachineName));
}
Public Function GetApplicationMachineName() As String
    ' Get the name of the application machine name.
    Return String.Format( _
    "Application machine name: {0}", _
    ApplicationInformation.MachineName())
End Function 'GetApplicationMachineName

Gilt für: