What is the purpose of Array.GetLowerBound(int)?

前端 未结 3 925
逝去的感伤
逝去的感伤 2021-02-19 10:01

I don\'t understand the purpose of Array.GetLowerBound().

Does it ever return non-zero? When? How?

Thanks.

3条回答
  •  孤城傲影
    2021-02-19 10:23

    Theoretically, you can create arrays with any lower or upper bound for indexing. VB.NET can use this to make arrays with a lower bound of 1 in order to be compatible with some older VB verions, but you can actually use Array.CreateInstance(Type,Int32[],Int32[]) to create an array with any lower bound you wish.

提交回复
热议问题