Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 21, 2012 06:32 AM by vicky1
Member
37 Points
370 Posts
Jun 21, 2012 05:59 AM|LINK
Hi all,
Hope doing well
I am storing string value in string array but not getting value one by one
plz help me
here is my code.
Dim ListLines As String() = {"Hai", "My", "Name", "is"} For Each element As String In ListLines Label12.Text = element(0).ToString()
Label13.Text = element(0).ToString()
Label14.Text = element(0).ToString()
Label15.Text = element(0).ToString() Next
i want to store the value one by one in these labels
it's urgent waiting for reply
Thanks in advance
All-Star
32146 Points
5530 Posts
Jun 21, 2012 06:08 AM|LINK
hi, do like below, no need of for each loop
Dim ListLines As String() = {"Hai", "My", "Name", "is"} Label12.Text = ListLines(0)
Label13.Text = ListLines(1)
Label14.Text = ListLines(2)
Label15.Text = ListLines(3)
Jun 21, 2012 06:32 AM|LINK
sir it's working fine but i am fetching these value from text file there i hardcoded that things
but all values are coming in one length so i am not able to store all values one by one
plz help me.
vicky1
Member
37 Points
370 Posts
How to fetch and store data from string array in vb.net
Jun 21, 2012 05:59 AM|LINK
Hi all,
Hope doing well
I am storing string value in string array but not getting value one by one
plz help me
here is my code.
Dim ListLines As String() = {"Hai", "My", "Name", "is"}
For Each element As String In ListLines
Label12.Text = element(0).ToString()
Label13.Text = element(0).ToString()
Label14.Text = element(0).ToString()
Label15.Text = element(0).ToString()
Next
i want to store the value one by one in these labels
it's urgent waiting for reply
Thanks in advance
karthicks
All-Star
32146 Points
5530 Posts
Re: How to fetch and store data from string array in vb.net
Jun 21, 2012 06:08 AM|LINK
hi, do like below, no need of for each loop
Dim ListLines As String() = {"Hai", "My", "Name", "is"}
Label12.Text = ListLines(0)
Label13.Text = ListLines(1)
Label14.Text = ListLines(2)
Label15.Text = ListLines(3)
Karthick S
vicky1
Member
37 Points
370 Posts
Re: How to fetch and store data from string array in vb.net
Jun 21, 2012 06:32 AM|LINK
sir it's working fine but i am fetching these value from text file there i hardcoded that things
but all values are coming in one length so i am not able to store all values one by one
plz help me.