PerformanceCounter.MachineName Proprietà

Definizione

Ottiene o imposta il nome computer per questo contatore delle prestazioni.

public:
 property System::String ^ MachineName { System::String ^ get(); void set(System::String ^ value); };
public string MachineName { get; set; }
[System.ComponentModel.Browsable(false)]
public string MachineName { get; set; }
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.SettingsBindable(true)]
public string MachineName { get; set; }
member this.MachineName : string with get, set
[<System.ComponentModel.Browsable(false)>]
member this.MachineName : string with get, set
[<System.ComponentModel.Browsable(false)>]
[<System.ComponentModel.SettingsBindable(true)>]
member this.MachineName : string with get, set
Public Property MachineName As String

Valore della proprietà

String

Il server sul quale risiedono il contatore delle prestazioni e la categoria associata.

Attributi

Eccezioni

Il formato di MachineName non è valido.

Commenti

È possibile scrivere valori solo ai contatori che risiedono nel computer locale. È tuttavia possibile leggere i valori dei contatori da qualsiasi computer dell'organizzazione per cui si dispone dei privilegi di accesso.

Quando si imposta la proprietà su un computer remoto, l'istanza MachineName PerformanceCounter tenta di aprire il contatore nel computer. Se il contatore non esiste, l'impostazione di questa proprietà genera un'eccezione.

Si applica a