About classes
In this post I will talk about classes and what you can do with them.
- Abstract class
When you create a abstract class, you want to ensure that this class can not be instantiated. You wil have to create a sub-class that wil actually use the functionality.
Example:
abstract class MyClass { }
- Extends
When you want to create a new class that inherits methods/properties from a other class, you can ‘extend’ the class. A typical example of a class you will extend from is the ‘RunBaseBatch’-class. When you do this, you will automatically be able to schedule your class.
Example:
class MyClass extends RunBaseBatch { }
- Implements / Interface
Sometimes you want to create a blue-print for new classes by creating a ‘Interface’ class. The you just need to ‘Implement’ the blueprint in you’re new class.
Example:
class MyClass implements SysComparable { }
Tags: Class, Dynamics AX, Programming, X++
This entry was posted on Saturday, March 6th, 2010 at 08:00 and is filed under Dynamics AX. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

