Share via


SecurityElement コンストラクター

定義

SecurityElement クラスの新しいインスタンスを初期化します。

オーバーロード

SecurityElement(String)

タグを指定して、SecurityElement クラスの新しいインスタンスを初期化します。

SecurityElement(String, String)

SecurityElement クラスの新しいインスタンスを、指定したタグとテキストを使用して初期化します。

SecurityElement(String)

ソース:
SecurityElement.cs
ソース:
SecurityElement.cs
ソース:
SecurityElement.cs

タグを指定して、SecurityElement クラスの新しいインスタンスを初期化します。

public:
 SecurityElement(System::String ^ tag);
public SecurityElement (string tag);
new System.Security.SecurityElement : string -> System.Security.SecurityElement
Public Sub New (tag As String)

パラメーター

tag
String

XML 要素のタグ名。

例外

tag パラメーターが null です。

tag パラメーターが XML で無効です。

次のコードは、コンストラクターを使用して SecurityElement 新しい SecurityElement オブジェクトを作成する方法を示しています。 このコード例は、SecurityElement クラスのために提供されている大規模な例の一部です。

SecurityElement^ windowsRoleElement = gcnew SecurityElement( L"WindowsMembership.WindowsRole" );
SecurityElement windowsRoleElement =
    new SecurityElement("WindowsMembership.WindowsRole");
Dim windowsRoleElement As New SecurityElement("WindowsMembership.WindowsRole")

注釈

パラメーターは tag 、有効な XML タグ名で構成されている必要があります。 文字列から無効な文字を削除するには、 を使用 Escape します。

適用対象

SecurityElement(String, String)

ソース:
SecurityElement.cs
ソース:
SecurityElement.cs
ソース:
SecurityElement.cs

SecurityElement クラスの新しいインスタンスを、指定したタグとテキストを使用して初期化します。

public:
 SecurityElement(System::String ^ tag, System::String ^ text);
public SecurityElement (string tag, string? text);
public SecurityElement (string tag, string text);
new System.Security.SecurityElement : string * string -> System.Security.SecurityElement
Public Sub New (tag As String, text As String)

パラメーター

tag
String

XML 要素のタグ名。

text
String

要素内のテキストの内容。

例外

tag パラメーターが null です。

tag パラメーターまたは text パラメーターが、XML で無効です。

注釈

パラメーターがの場合、 text このコンストラクターは null パラメーターなしのコンストラクターと同じ要素を生成します。

適用対象