XmlException.LinePosition 속성

정의

오류가 발생한 곳을 나타내는 줄 위치를 가져옵니다. 줄 위치는 1부터 시작합니다.

public:
 property int LinePosition { int get(); };
public int LinePosition { get; }
member this.LinePosition : int
Public ReadOnly Property LinePosition As Integer

속성 값

오류가 발생한 곳을 나타내는 줄 위치입니다.

설명

XML이 다음 메시지와 함께 을 throw할 XmlException 때 문자열 "<<foo>\r\nbar</foo>" 을 로드하려고 합니다.

System.Xml.XmlException: 'Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 1, position 2.'

줄 위치가 1 기반임을 보여 줍니다(오류는 두 번째 문자에서 찾을 수 있습니다).

적용 대상