XDeclaration.Standalone プロパティ

定義

このドキュメントのスタンドアロン プロパティを取得または設定します。

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

プロパティ値

このドキュメントのスタンドアロン プロパティを含む String

次の例では、このプロパティを使用して、宣言のスタンドアロン プロパティを出力します。

XDeclaration xd = new XDeclaration("1.0", "utf-8", "yes");
Console.WriteLine(xd.Version);
Console.WriteLine(xd.Encoding);
Console.WriteLine(xd.Standalone);
Dim xd As XDeclaration = New XDeclaration("1.0", "utf-8", "yes")
Console.WriteLine(xd.Version)
Console.WriteLine(xd.Encoding)
Console.WriteLine(xd.Standalone)

この例を実行すると、次の出力が生成されます。

1.0
utf-8
yes

注釈

スタンドアロンの有効な値は "yes" または "no" です。 これらの値は適用されません。

適用対象

こちらもご覧ください