Originally Posted By: Kartoffel
afaik no.

but if you really need it you can use a struct to wrap the array and store an integer with the index-count inside that struct.


I already did that, but I have many different structs and each array in each struct have a different size. So I was hoping that there's a general way to find out the element count to save a lot of typing work.


Originally Posted By: Superku
A simple solution for var and int arrays and the like obviously is to save the size in the zero index.
Keep in mind that you lose one index/ have to allocate one more (and I would save "size-1" in the zero index then).


That would be a general solution, but the problem is, most of my arrays are not variable arrays (mostly struct arrays).