Bonjour,
voici mon problème. J'ai un fichier texte structuré ainsi :
Laurent;16;Toulouse
Jean;42;Agen
Igor;53;Bordeaux
et une structure déclarée ainsi :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 Public Structure InfosPersonnes Public Nom as String Public Age as integer Public Ville as integer End StructureJ'ai essayé un truc du style :
Code : Sélectionner tout - Visualiser dans une fenêtre à part Dim Personnes() as InfoPersonnes
Mais ca marche pas. Quelqu'un aurait il la solution svp ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 Dim TXT As StreamReader = New StreamReader("./data/l922.csv") a=0 Do Ligne = TXT.ReadLine If Ligne <> Nothing Then redim preserve Personnes(a) Personnes(a)=split(LIgne,";") End If Loop While Ligne <> Nothing TXT.Close()
Partager