Type of Array.length?

Alexander Panek a.panek at brainsware.org
Fri Jan 19 15:02:35 PST 2007


Heinz wrote:
> Hi,
> 
> I just want to know what type is the one returned by the .length property of an array.
> 
> Thanks.

Easiest way to achieve the array is either:

typeof(array.length) len;

or:

auto len = array.length;


You don't even have to really care for the type then, actually, and it 
stays platform independent, anyways.


More information about the Digitalmars-d-learn mailing list