SecurityElement コンストラクター

定義

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

オーバーロード

名前 説明
SecurityElement(String)

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

SecurityElement(String, String)

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

SecurityElement(String)

ソース:
SecurityElement.cs
ソース:
SecurityElement.cs
ソース:
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

xml では、 tag パラメーターが無効です。

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

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.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

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

注釈

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

適用対象