Salut,
Je voulais savoir comment remplir un tableau à une dimension dans le desordre
voici mon code
Lorsque je fai affiche le tableau par messagebox il ne m'affiche que "je" et "un", est ce normal? Comment y remedier?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 Public Class Form1 Public tab(3) As String Public i As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ReDim Preserve tab(1) tab(1) = "suis" ReDim Preserve tab(3) tab(3) = "garcon" MsgBox(tab(3)) ReDim Preserve tab(0) tab(0) = "je" ReDim Preserve tab(2) tab(2) = "un" For i = 0 To 3 MsgBox(tab(i)) Next End Sub End Class
Partager