Skip to content

Should Convert.ChangeType handle unions especially? #128226

@Youssef1313

Description

@Youssef1313

For example:

Console.WriteLine(Convert.ChangeType("Hello", typeof(MyUnion)));

union MyUnion(string, int);

This throws InvalidCastException today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Runtimeneeds-author-actionAn issue or pull request that requires more info or actions from the author.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions