XDeclaration.Version Proprietà

Definizione

Ottiene o imposta la proprietà version per questo documento.

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

Valore della proprietà

Oggetto String contenente la proprietà version per questo documento.

Esempio

Nell'esempio seguente viene utilizzata questa proprietà per stampare la proprietà version di una dichiarazione.

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)

In questo esempio viene generato l'output seguente:

1.0
utf-8
yes

Commenti

Il valore è in genere "1,0". Questo valore non viene applicato.

Si applica a

Vedi anche