共用方式為


XmlReaderSettings.LinePositionOffset Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets line position offset of the XmlReader object.

Namespace:  System.Xml
Assembly:  System.Xml (in System.Xml.dll)

Syntax

'Declaration
Public Property LinePositionOffset As Integer
public int LinePositionOffset { get; set; }

Property Value

Type: System.Int32
The line number offset. The default is 0.

Remarks

The LinePositionOffset setting determines the point where the LinePosition property starts counting. This is useful if your XML data is embedded within a larger document and there is no new line at the beginning of the XML. In this case, if the reader throws an exception while parsing the XML, you want it to return the line position relative to the main document, not just relative to the XML fragment.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.