Hello There! How do we call method in main class from another class
Created at 25 Apr 2021, 08:11
IM
Hello There! How do we call method in main class from another class
25 Apr 2021, 08:11
Hello There !
How do we call method that we created in main class (a class that contain OnTick() OnStart() OnStop())
from a class that we create by ourselves.
thank you.
amusleh
25 Apr 2021, 11:14
Hi,
Those are methods with "protected" access modifier, you can't call a protected method from another class, only the class itself or its derived classes can call a protected method.
Here is an example that might help you:
These kind of topics aren't related to cTrader automate API, you have to learn C# and Google for similar issues in C#, you will find a lot of solutions.
There is a way to call protected methods via Reflection, Google and you will find lots of code examples for it.
@amusleh