forum

Home / DeveloperSection / Forums / Starting Index of Arrays in C# and VB.Net

Starting Index of Arrays in C# and VB.Net

Anonymous User357808-Apr-2013
Hi All!

Have a look at the following code.,

C#

 string[] testString = new string[jobs.Count];
Equivalent VB.Net

Dim testString() As String = New String(jobs.Count - 1) {}
Why it is taking 'jobs.Count - 1' instead 'jobs.Count' in vb.net while creating new arrays?

Advance thanks!

Updated on 08-Apr-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By