how to use array in vb.net

Posted by Shanky11 under VB.NET on 3/25/2013 | Points: 10 | Views : 1195 | Status : [Member] | Replies : 1
Dim aaray1() As String = New String() {"shankar", "mishra"}
ResultListBox1.Items.Add("The First Index of Array is " & aaray(1))
ReDim aaray1(1)
aaray1(0) = "chennai"
aaray1(1) = "Delhi"
ResultListBox1.Items.Add(" Array is " & aaray1(1))


tell me why this is not printing in Delhi




Responses

Posted by: Satyapriyanayak on: 3/25/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Public Class Form2

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim aaray1() As String = New String() {"shankar", "mishra"}
ResultListBox1.Items.Add("The First Index of Array is " & aaray1(1))
ReDim aaray1(1)
aaray1(0) = "chennai"
aaray1(1) = "Delhi"
ResultListBox1.Items.Add(" Array is " & aaray1(1))
End Sub
End Class

If this post helps you mark it as answer
Thanks

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response