Thursday, March 9, 2017

X++ Method parameters actually pass by value or reference?

Hi Daxer's,

I have confusion regarding pass by value and pass by reference, so i have gone through this as below

Generally, parameter passing in DAX is always done by value except for class instances and records.

Major base types in Dynamics Ax
String = Assigned and passed by VALUE
Integer = Assigned and passed by VALUE
Real = Assigned and passed by VALUE
Date = Assigned and passed by VALUE
Enum = Assigned and passed by VALUE
Container = Assigned and passed by VALUE
Record = Assigned and passed by REFERENCE
Class instance (any object instanciated with ‘new()‘) = Assigned and passed by REFERENCE
AnyType = Assigned and passed by VALUE, even when holding a Record or Class instance
Guid = Assigned and passed by VALUE
Int64 = Assigned and passed by VALUE

No comments:

Post a Comment

Export a copy of the standard user acceptance testing (UAT) database

 Reference link: Export a copy of the standard user acceptance testing (UAT) database - Finance & Operations | Dynamics 365 | Microsoft ...