XmlException.LineNumber 속성

정의

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

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

속성 값

오류가 발생한 위치를 나타내는 줄 번호입니다.

설명

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

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

줄 번호가 1부터 시작됨을 보여 줍니다(첫 번째 줄에서 오류가 발견됨).

적용 대상