arrays - 如何在 Axapta 3.0 中清空数组?

标签 arrays axapta

有人可以详细说明如何在 Axapta 3.0 中清空数组吗?

最佳答案

要释放一个 Array 对象,只需为其分配 null 即可:

Array myArray = new Array(Types::Integer);
;
myArray = null; //remove reference to Array so it will be garbage collected

要重置数组类型的所有元素,请为元素 0 赋值:

int myArray[10];
;
myArray[0]=0; //reset all elements of the array to their default value

关于arrays - 如何在 Axapta 3.0 中清空数组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/648943/

相关文章:

axapta - 设置 CommandButton 以了解要操作哪个网格

sql-server - 启动 AX 2012 R3 服务时出错

javascript - 使用数组 javascript 查找最长的字谜

php - 引用 - 这个错误在 PHP 中意味着什么?

ruby-on-rails - 如果只有一个存在,是否有用于返回第一个数组元素的 ruby​​ 习惯用法?

python - numpy 数组,即 (n,1) 和 (n,)

axapta - AX 2009 的正确部署流程是什么

axapta - 在 Dynamics AX 2012 中从采购线获取线的尺寸

axapta - 如何在Microsoft Dynamic AX的AOT中查找合适的EDT?

python - 在python中存储大量 bool 数据