Skip to content

Nullability annotations in XElement constructor #43416

@olmobrutall

Description

@olmobrutall

After downloading the latest .Net 5 SDK (Preview 2) I'm starting to update my code to it.

I'm using nullable reference types.

I think the nullability annotations could be improved in

public XElement(XName name, params object[] content) : this(name, (object)content) { }

public XElement(XName name, params object[] content) : this(name, (object)content) { } //Currently
public XElement(XName name, params object?[] content) : this(name, (object)content) { } //Fixed

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions