What's new

Visual Basic How to take all array elements except last element vb.net?

boylugaw03

Addict
Joined
May 19, 2021
Posts
190
Reaction
88
Points
85
Hello mga lodi... Baka may code kayo jan sa vb.net na 2D array pero hindi need yung last element ng array... TIA!!!
 
Dim example_array = {"1st", "2nd", "last"}
Dim stext As String = Nothing
For i = 0 To example_array.Count - 2

stext &= example_array(i) & vbLf

Next
MsgBox(stext)

ganto ba?
 
Dim example_array = {"1st", "2nd", "last"}
Dim stext As String = Nothing
For i = 0 To example_array.Count - 2

stext &= example_array(i) & vbLf

Next
MsgBox(stext)

ganto ba?
Prang ganto ksi yung current array
Array1Array2
AAA
BBB
CCC


Tapos lilipat ko sa tempArray pro di na dapat kasali yun C, CC
 

Similar threads

Back
Top