Starting Index of Arrays in C# and VB.Net

后端 未结 3 938
既然无缘
既然无缘 2020-12-11 16:57

Have a look at the following code.,

C#

 string[] testString = new string[jobs.Count];

Equivalent VB.Net

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-11 17:35

    In VB.NET the number in the array declaration means "max index", but in C# it means "number of elements"

提交回复
热议问题