Skip to main content
All docs
V22.2
  • Constructor

    Generates a constructor of a class, structure, or record with parameters that initialize the selected members.

    Selectable items: type members that you want to initialize.

    Options

    Constructor Accessibility

    Values:

    • public (default value)
    • internal
    • protected internal
    • protected
    • private

    Generate Properties

    Values:

    • yes
    • no (default value)

    Example

    The screencast below shows how to use the Constructor declare action in the Declare Menu.

    smart-constructor

    Positional Records Support

    The Constructor feature supports positional records:

    positional-records