【发布时间】:2009-03-16 01:15:48
【问题描述】:
谁能详细说明如何在 Axapta 3.0 中清空数组?
【问题讨论】:
谁能详细说明如何在 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
【讨论】:
引用自 msdn http://msdn.microsoft.com/en-us/library/aa653716.aspx
n X++, item zero[0] 用于清空数组!赋值给 数组中的索引 0 将数组中的所有元素重置为默认值 价值。例如,
intArray[0] = 0; //重置intArray中的所有元素
【讨论】: