Skip to content

Nullable fields should default to Required = false #79

Description

@jaskij

As in the subject - when a field is nullable, it should default to being optional, regardless of being a value or reference type.

Something like below should not need explicit Required = false.

    [CliOption(Required = false, Description = "Firmware file to program (skip programming if absent)")]
    internal FileInfo? FirmwareFile { get; set; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions