XmlDocument.XmlResolver nullability change
The nullability for XmlDocument.XmlResolver has changed in .NET 6. The property setter now accepts a nullable reference.
Previous behavior
The setter for XmlDocument.XmlResolver was annotated as not accepting null
:
public virtual System.Xml.XmlResolver XmlResolver { set { } }
New behavior
The setter for XmlDocument.XmlResolver is annotated as accepting null
:
public virtual System.Xml.XmlResolver? XmlResolver { set { } }
Version introduced
6.0 RC 1
Type of breaking change
This change can affect binary compatibility if you've overridden this property in a derived type.
Reason for change
The non-nullable annotation was incorrect.
Recommended action
If you have overridden this property in a derived type, you'll need to update your code to handle null
when setting the property value.
Affected APIs
Feedback
Submit and view feedback for