如何清空Axapta 3.0中的数组?

Nam*_*dgi 3 arrays axapta

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

Jay*_*ker 5

要释放Array对象,只需为其指定null:

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

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

int myArray[10];
;
myArray[0]=0; //reset all elements of the array to their default value
Run Code Online (Sandbox Code Playgroud)