HttpServerUtility.MachineName HttpServerUtility.MachineName HttpServerUtility.MachineName HttpServerUtility.MachineName Property

定義

取得伺服器的電腦名稱。Gets the server's computer name.

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

屬性值

本機電腦的名稱。The name of the local computer.

例外狀況

無法找到電腦名稱。The computer name cannot be found.

範例

下列範例會將伺服器的電腦名稱儲存為字串變數。The following example stores the server's computer name as a string variable.

String ThisMachine;
ThisMachine = Server.MachineName;
   
Dim ThisMachine As String
ThisMachine = Server.MachineName
   

適用於