SwitchAttribute.GetAll メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SwitchAttribute.GetAll メソッドの意味・解説 

SwitchAttribute.GetAll メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

指定されアセンブリすべてのスイッチ属性返します

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

Public Shared Function GetAll
 ( _
    assembly As Assembly
 _
) As SwitchAttribute()
Dim assembly As Assembly
Dim returnValue As SwitchAttribute()

returnValue = SwitchAttribute.GetAll(assembly)
public static SwitchAttribute[] GetAll (
    Assembly assembly
)
public:
static array<SwitchAttribute^>^ GetAll (
    Assembly^ assembly
)
public static SwitchAttribute[] GetAll (
    Assembly assembly
)
public static function GetAll
 (
    assembly : Assembly
) : SwitchAttribute[]

パラメータ

assembly

スイッチ属性確認する対象Assembly

戻り値
アセンブリすべてのスイッチ属性を含む型 SwitchAttribute の配列

例外例外
例外種類条件

ArgumentNullException

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

使用例使用例

GetAll メソッド使用してアセンブリ内で使用されるスイッチ識別するコード例次に示します。このコード例は、TraceSource クラストピック取り上げているコード例一部分です。

Dim switches As SwitchAttribute() = SwitchAttribute.GetAll([Assembly].GetExecutingAssembly())
Dim i As Integer
For i = 0 To switches.Length - 1
    Console.WriteLine("Switch name = " + switches(i).SwitchName.ToString())
    Console.WriteLine("Switch type = " + switches(i).SwitchType.ToString())
Next i
SwitchAttribute[] switches = SwitchAttribute.GetAll(Assembly.GetExecutingAssembly());
for (int i = 0; i < switches.Length; i++)
{
    Console.WriteLine("Switch name = " + switches[i].SwitchName);
    Console.WriteLine("Switch type = " + switches[i].SwitchType);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「SwitchAttribute.GetAll メソッド」の関連用語

SwitchAttribute.GetAll メソッドのお隣キーワード
検索ランキング

   

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



SwitchAttribute.GetAll メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS