XDeclaration.Version 속성

정의

이 문서의 버전 속성을 가져오거나 설정합니다.

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

속성 값

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

설명

값은 일반적으로 "1.0"입니다. 이 값은 적용되지 않습니다.

적용 대상

추가 정보