tags:

views:

381

answers:

1

Hi All, Can someone please detail how to empty an array in Axapta 3.0? Thanks!

+3  A: 

To free an Array object, just assign null to it:

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

To reset all elements of an array type, assign a value to element 0:

int myArray[10];
;
myArray[0]=0; //reset all elements of the array to their default value
Jay Hofacker
Thanks Jay ... most appreciated ...
Namadgi