XML 특성은 'type' 형식에서 선택할 수 없습니다.
업데이트: 2007년 11월
XML attributes cannot be selected from type 'type'
XElement 또는 IEnumerable(Of XElement) 형식이 아닌 개체에 대해 XML 특성을 참조했습니다. 자세한 내용은 XML 특성 축 속성을 참조하십시오.
' Generates an error.
Dim var = "sample text".@attr
오류 ID: BC36808
이 오류를 해결하려면
특성을 참조하는 개체가 XElement 또는 IEnumerable(Of XElement)로 강력하게 형식이 지정되었는지 확인합니다. 예를 들면 다음과 같습니다.
Dim elem As XElement = <root attr="value"/> Dim var = elem.@attr