void test(EcoResProductMaster _EcoResProductMaster = null)
{
;
EcoResProductMaster.data(_EcoResProductMaster);
this.aaa();
this.bbb();
this.ccc();
_EcoResProductMaster.data(EcoResProductMaster);
}
I googled and then I found the following useful link.
So there are two base types in X++ which are passed by reference. They are record and class.
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 |
Hope that helps, enjoy your day.
No comments:
Post a Comment