Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 925 Bytes

xmlschemaexception-now-sets-line-positions-properly.md

File metadata and controls

27 lines (16 loc) · 925 Bytes

XmlSchemaException now sets line positions properly

Details

If the xref:System.Xml.Linq.LoadOptions.SetLineInfo value is passed to the Load method and a validation error occurs, the xref:System.Xml.Schema.XmlSchemaException.LineNumber and xref:System.Xml.Schema.XmlSchemaException.LinePosition properties now contain line information.

Suggestion

Exception-handling code that assumes xref:System.Xml.Schema.XmlSchemaException.LineNumber and xref:System.Xml.Schema.XmlSchemaException.LinePosition will not be set should be updated since these properties will now be set properly when SetLineInfo is used while loading XML.

Name Value
Scope Edge
Version 4.5
Type Runtime

Affected APIs

  • xref:System.Xml.Linq.LoadOptions.SetLineInfo?displayProperty=nameWithType