Users Pricing

forum

home / developersection / forums / starting index of arrays in c# and vb.net

Starting Index of Arrays in C# and VB.Net

Anonymous User 4057 08 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!

I am a content writter !


1 Answers