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

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

PerformanceCounterCategory.CategoryName プロパティ

このカテゴリ定義するパフォーマンス オブジェクト名を取得または設定します

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

Dim instance As PerformanceCounterCategory
Dim value As String

value = instance.CategoryName

instance.CategoryName = value
public string CategoryName { get;
 set; }
public:
property String^ CategoryName {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_CategoryName ()

/** @property */
public void set_CategoryName (String value)
public function get CategoryName
 () : String

public function set CategoryName
 (value : String)

プロパティ
この PerformanceCounterCategory インスタンス関連付けるパフォーマンス カウンタ カテゴリまたはパフォーマンス オブジェクトの名前。

例外例外
例外種類条件

ArgumentException

CategoryName空の文字列 ("") です。

ArgumentNullException

CategoryNamenull 参照 (Visual Basic では Nothing) です。

使用例使用例

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 名前空間
MachineName
PerformanceCounter クラス


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

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

辞書ショートカット

すべての辞書の索引

「PerformanceCounterCategory.CategoryName プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS