Skip to content

[REQ] [csharp] Handling of nullable and required properties #22254

@Bouillie

Description

@Bouillie

Is your feature request related to a problem? Please describe.

With the current csharp generators (except generichost), there is a confusion between required and nullable fields. Nullable fields and non-required fields are both using the csharp nullable operator "?". It leads to several problems.

Describe the solution you'd like

Make a distinction between required and nullable fields. The solution used by generichost, using an Option struct for required fields seems good.

Describe alternatives you've considered

An alternative is moving to generichost but it's not possible for my project.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions