次の方法で共有


SecurityElement.Text プロパティ

定義

XML 要素内のテキストを取得または設定します。

public:
 property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
public string? Text { get; set; }
public string Text { get; set; }
member this.Text : string with get, set
Public Property Text As String

プロパティ値

XML 要素内のテキストの値。

例外

テキストは XML では無効です。

次のコードは、 Text プロパティを使用して XML 要素のテキストを取得する方法を示しています。 このコード例は、 SecurityElement クラスに提供されるより大きな例の一部です。

string xmlTreeDescription = xmlElement.Text;
Dim xmlTreeDescription As String = xmlElement.Text

注釈

テキストに XML 特殊文字を含めてはなりません。 Escapeを使用して、文字列から無効な文字を削除します。

SecurityElementTextChildrenの両方が含まれている場合は、Textが最初に表示されます。

適用対象