Method modifiers recap in Microsoft Dynamics 365 Finance and Operations apps
- abstract – The method is declared but isn't implemented in a parent class. The method must be overridden in subclasses. If you try to create an object from a subclass where one or more abstract methods that belong to the parent class haven't been overridden, you receive a compiler error. Classes can also be abstract.
- display – The method's return value should be shown on a page or a report. The value can't be modified on the page or report. Typically, the return value is a calculated value, such as a sum.
- edit – The method's return type should be used to provide information for a field that is used on a page. The value in the field can be modified.
- final – The method can't be overridden in any class that derives from its class.
- public – Methods that are declared as public can be accessed anywhere that the class is accessible, and they can be overridden by subclasses. Methods that have no access modifier are implicitly public.
- protected – Methods that are declared as protected can be called only from methods in the class and in subclasses that extend the class where the method is declared.
- private – Methods that are declared as private can be called only from methods in the class where the private method is declared.
- static – The method is a class method and doesn't act on an instance. Static methods can't refer to instance variables.
*This post is locked for comments