Announcements
Hi Guys,
I wanna to know The role of Run() and Main method in X++
Thanks in advance,
Riyaz
*This post is locked for comments
in majority of oop based programming langauges its needs only one of two things in order to run a class
1) create an object of class and use it to call any of its methods
OR
2) create a main method in the class and just run the class. the class will get a entry point itself by main method
if you remember java
public static void main(String[] args)
if you remember c++
#include<iostream>
using namespace std;
int main()
{
cout << "Hello World!";
return 0;
}
okay now run method
It is common to call methods within one class from other methods in that class.
in such cases a run method is written in class and by using approach#1 i.e creating object of class we just call run method of class and remaining it handles
Only main() method has a special meaning - it's can be called from menu items. Run() method is just a method as any other.
Of course, there are important classes that have a method called run() (such as the RunBase framework), but you would have to tell which class you have in mind.
What is the role of Run() method in Form?
It will "execute" / open the form. If it's not called, the form is not opened.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Sanhthosh.Kumar.K 2
Raed Salah Bzour 1