Switch コンストラクタ (String, String)
アセンブリ: System (system.dll 内)

Protected Sub New ( _ displayName As String, _ description As String _ )
Dim displayName As String Dim description As String Dim instance As New Switch(displayName, description)
protected: Switch ( String^ displayName, String^ description )
- displayName
スイッチの名前。

新しい Switch オブジェクトを作成するときに、displayName パラメータの値を使用して、スイッチの初期設定値を検索します。既定値は空の文字列 ("") です。
XML 構成ファイルでは、スイッチの追加、その値の設定、スイッチの削除、アプリケーションで以前設定されたすべてのスイッチのクリアを実行できます。アプリケーションの実行中は、構成ファイルへの動的な変更は検出されません。構成ファイルへの変更を有効化するには、アプリケーションを停止して再起動する必要があります。構成ファイルの書式は次の例のようになります。
<configuration> <system.diagnostics> <switches> <add name="mySwitch" value="10" /> <add name="myNewSwitch" value="20" /> <remove name="mySwitch" /> <clear/> </switches> </system.diagnostics> </configuration>
![]() |
---|

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Switch コンストラクタ

名前 | 説明 |
---|---|
Switch (String, String) | Switch クラスの新しいインスタンスを初期化します。 |
Switch (String, String, String) | スイッチの表示名、説明、および既定値を指定して、Switch クラスの新しいインスタンスを初期化します。 |

Switch コンストラクタ (String, String, String)
アセンブリ: System (system.dll 内)

Protected Sub New ( _ displayName As String, _ description As String, _ defaultSwitchValue As String _ )
Dim displayName As String Dim description As String Dim defaultSwitchValue As String Dim instance As New Switch(displayName, description, defaultSwitchValue)
protected Switch ( string displayName, string description, string defaultSwitchValue )
protected: Switch ( String^ displayName, String^ description, String^ defaultSwitchValue )
protected Switch ( String displayName, String description, String defaultSwitchValue )
protected function Switch ( displayName : String, description : String, defaultSwitchValue : String )
- displayName
スイッチの名前。

displayName パラメータは DisplayName プロパティの値を設定するために使用され、description パラメータは Description プロパティの値を設定するために使用されます。defaultSwitchValue パラメータは、Value コードまたは構成ファイルの属性によってプロパティが設定されない場合のスイッチの値です。詳細については、Switch(String,String) オーバーロードのトピックを参照してください。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- Switch コンストラクタのページへのリンク