4D v19

collection.length

  •  
 
4D v19
collection.length

collection.length 


 

   
Paramètre Type   Description
collection.length   Entier long in Nombre d'éléments dans la collection

The collection.length property returns the number of elements in the collection.

The collection.length property is initialized when the collection is created. Adding or removing elements updates the length, if necessary. This property is read-only (you cannot use it to set the size of the collection).

Exemplo  

 C_COLLECTION($col//$col.length initialized to 0
 $col:=New collection("one";"two";"three") //$col.length updated to 3
 $col[4]:="five" //$col.length updated to 5
 $vSize:=$col.remove(0;3).length //$vSize=2



Voir aussi  

collection.count( )
collection.resize( )