Home / Questions / Can instance methods access static members of a class in X++? Explain.
Explanatory Question

Can instance methods access static members of a class in X++? Explain.

👁 41 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Yes, instance methods in X++ can access both static and instance members of a class. Since instance methods are associated with a specific object, they have access to the object's state (instance variables) as well as any static members that belong to the class itself.