Table Of Contents

Creating a Class

Last Modified: February 27, 2020

Define the fields and methods of a class using a class.

Make sure you are familiar with the terminology in Classes and Object-Oriented Programming.

Complete the following steps to create a class.

  1. From the Project Files tab, use the New menu to create a class.
  2. To add a class field, add a control or indicator to the Data view of the class.
  3. To add a class method, right-click a class in the Project Files tab and select Add member to select a template to use as a starting point.
    Option Description
    for data member access Create an interface that other parts of your program can use to read or write to a class field.

    You can only create a method for data member access if a control or indicator is present on the Data view of the class.

    from dynamic dispatch template Create a version of a method specific to the class. The program chooses the version of the method to execute at run time based on the object the method input accepts.
    from static dispatch template Create a method that has the same functionality for all class objects it accepts.
    Override Create a method that overrides a method on the Member List of a parent class in your project.

    The option to create a method for override is available only when the Member List of the ancestor class contains a valid member method to override.

    Blank Create an empty method for the class.
    Class Property Create a property that can use methods you create to access fields on the Data view.

Recently Viewed Topics