Pregunta

¿Alguien puede detallar cómo vaciar una matriz en Axapta 3.0?

¿Fue útil?

Solución

Para liberar un objeto Array, simplemente asigne un valor nulo:

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

Para restablecer todos los elementos de un tipo de matriz, asigne un valor al elemento 0:

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

Otros consejos

Cita de msdn http://msdn.microsoft.com/en-us /library/aa653716.aspx

  

n X ++, el elemento cero [0] se usa para borrar la matriz. Asignando un valor a   el índice 0 en una matriz restablece todos los elementos de la matriz a los valores predeterminados   valor. Por ejemplo,

     

intArray [0] = 0; // Restablece todos los elementos en intArray

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top