Telerik® JustCode™ by Progress

The Create Constructor command lets you create a non-default constructor on-the-fly by just selecting the fields that you’d like the constructor to take as parameters.

Note

Language Support

Supported: C#, VB.NET

Not relevant: ASP.NET, XAML, JavaScript, HTML

To Create a Constructor

  1. Select the fields and properties that you like to include for initialization.

    Create Constructor Selection
  2. Press Alt+End. From the pop-up menu, select Create constructor

    Create Constructor Select
  3. The result is:

    Create Constructor Select Result
Tip

Instead of selecting a field, you can just position the caret over it and then generate the constructor.

Tip

To create a constructor you can also navigate on the main menu. Choose JustCode | Code | Create Constructor, or just press Ctrl+R, Ctrl+C

Rules

To generate a constructor Telerik® JustCode™ follows these rules:

  • All selected fields are included in the constructor as parameters with their corresponding names;
  • Each field is initialized with the corresponding parameter.

See Also