Skip to Content

MB-500: What Is the Best Way to Create Class-Level Methods in Dynamics 365 Using X++?

How to Define Static Methods in X++ for Dynamics 365 F&O Development?

Table of Contents

Question

You are working on finance and operations apps using X++. You have created a class.

You want to add a method that belongs to the class, not an instance of the class, and exists even if an instance of the class is not created.

You need to add an accessor keyword to that method.

Which should you use?

Select only one answer.

A. protected
B. static
C. private
D. public

Answer

B. static

Explanation

The ‘static’ keyword is used to declare a method that belongs to the class, not an instance of the class. It exists even if an instance of the class is not created. ‘public’, ‘private’, and ‘protected’ are accessor keywords, not used to declare a method that belongs to a class.

Microsoft Dynamics 365: Finance and Operations Apps Developer MB-500 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Dynamics 365: Finance and Operations Apps Developer MB-500 exam and earn Microsoft Dynamics 365: Finance and Operations Apps Developer MB-500 certification.