PerformanceCounterCategory.MachineName プロパティ
アセンブリ: System (system.dll 内)
構文Dim instance As PerformanceCounterCategory Dim value As String value = instance.MachineName instance.MachineName = value
/** @property */ public String get_MachineName () /** @property */ public void set_MachineName (String value)
パフォーマンス カウンタ カテゴリと、それに関連付けられているカウンタが存在するコンピュータの名前。
例外
使用例PerformanceCounterCategory を PerformanceCounterCategory コンストラクタで作成するコード例を次に示します。PerformanceCounterCategory およびコンピュータの名前を入力するよう求めるメッセージを表示し、入力された値を使用して CategoryName プロパティおよび MachineName プロパティを設定します。次に、CategoryName、MachineName、および CategoryHelp の各プロパティの値を表示します。また、PerformanceCounterCategory にアクセスできない場合はエラー メッセージを表示します。
Sub Main(ByVal args() As String) Dim categoryName As String = "" Dim machineName As String = "" Dim pcc As New PerformanceCounterCategory ' Prompt for fields and set the corresponding properties. While categoryName.Length = 0 Console.Write("Please enter a non-blank category name: ") categoryName = Console.ReadLine().Trim If categoryName.Length > 0 Then pcc.CategoryName = categoryName End If End While While machineName.Length = 0 Console.Write( _ "Enter a non-blank computer name ['.' for local]: ") machineName = Console.ReadLine().Trim If machineName.Length > 0 Then pcc.MachineName = machineName End If End While ' Display the properties of the PerformanceCounterCategory object. Try Console.WriteLine(" Category: {0}", pcc.CategoryName) Console.WriteLine(" Computer: {0}", pcc.MachineName) Console.WriteLine(" Help text: {0}", pcc.CategoryHelp) Catch ex As Exception Console.WriteLine("Error getting the properties of the " & _ "PerformanceCounterCategory object:") Console.WriteLine(ex.Message) End Try End Sub
.NET Framework のセキュリティ
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照PerformanceCounterCategory クラス
PerformanceCounterCategory メンバ
System.Diagnostics 名前空間
PerformanceCounterCategory.CategoryName プロパティ
PerformanceCounter クラス
Weblioに収録されているすべての辞書からPerformanceCounterCategory.MachineName プロパティを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からPerformanceCounterCategory.MachineName プロパティ
を検索
- PerformanceCounterCategory.MachineName プロパティのページへのリンク