PerformanceCounterCategory.MachineName プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PerformanceCounterCategory.MachineName プロパティの意味・解説 

PerformanceCounterCategory.MachineName プロパティ

このカテゴリ存在するコンピュータの名前を取得または設定します

名前空間: System.Diagnostics
アセンブリ: System (system.dll 内)
構文構文

Dim instance As PerformanceCounterCategory
Dim value As String

value = instance.MachineName

instance.MachineName = value
public string MachineName { get;
 set; }
/** @property */
public String get_MachineName ()

/** @property */
public void set_MachineName (String value)
public function get MachineName
 () : String

public function set MachineName
 (value : String)

プロパティ
パフォーマンス カウンタ カテゴリと、それに関連付けられているカウンタ存在するコンピュータの名前。

例外例外
例外種類条件

ArgumentException

MachineName 構文無効です。

使用例使用例

PerformanceCounterCategory を PerformanceCounterCategory コンストラクタ作成するコード例次に示しますPerformanceCounterCategory およびコンピュータの名前を入力するよう求めメッセージ表示し入力された値を使用して CategoryName プロパティおよび MachineName プロパティ設定します次にCategoryNameMachineName、および 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 のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PerformanceCounterCategory クラス
PerformanceCounterCategory メンバ
System.Diagnostics 名前空間
PerformanceCounterCategory.CategoryName プロパティ
PerformanceCounter クラス


このページでは「.NET Framework クラス ライブラリ リファレンス」からPerformanceCounterCategory.MachineName プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からPerformanceCounterCategory.MachineName プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からPerformanceCounterCategory.MachineName プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

PerformanceCounterCategory.MachineName プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



PerformanceCounterCategory.MachineName プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS