XElement.LastAttribute 속성

정의

이 요소의 마지막 특성을 가져옵니다.

public:
 property System::Xml::Linq::XAttribute ^ LastAttribute { System::Xml::Linq::XAttribute ^ get(); };
public System.Xml.Linq.XAttribute LastAttribute { get; }
public System.Xml.Linq.XAttribute? LastAttribute { get; }
member this.LastAttribute : System.Xml.Linq.XAttribute
Public ReadOnly Property LastAttribute As XAttribute

속성 값

XAttribute

이 요소의 마지막 특성이 들어 있는 XAttribute입니다.

예제

다음 예제에서는 세 가지 특성이 있는 XML 트리를 만듭니다. 그런 다음 마지막 특성을 출력으로 씁니다.

XElement xmlTree = new XElement("Root",  
    new XAttribute("Att1", 1),  
    new XAttribute("Att2", 2),  
    new XAttribute("Att3", 3)  
);  
Console.WriteLine(xmlTree.LastAttribute);  
Dim xmlTree As XElement = <Root Att1="1" Att2="2" Att3="3"/>  
Console.WriteLine(xmlTree.LastAttribute)  

이 예제는 다음과 같은 출력을 생성합니다.

Att3="3"  

설명

특성은 요소에 추가된 순서대로 요소에 저장됩니다.

적용 대상

추가 정보