What is the purpose of LongLength for .Net Arrays?

后端 未结 4 1229
轮回少年
轮回少年 2021-01-13 08:40

What is the purpose of the LongLength property for arrays in .Net. Using a standard integer for length, you could accommodate up to 2 billion indices. Are there really peo

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-13 09:33

    Plus it returns the total number of elements in all the dimensions of the Array so it can be an array with "just" a half billion elements and 4 dimensions to make it needed to be 64-bit int.

提交回复
热议问题