Salut à tous


J'ai un arraylist et une classe UnFormat définis comme suit

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
20
21
22
23
24
Dim MyStruct as New Arraylist
 
Public Class UnFormat
    Dim _colMin As String
     Dim _MyVal As String
 
   Public Sub New(ByVal LigneTexte As String)
        Me._colMin = Trim(Mid(LigneTexte, 39, 10))          
    End Sub
 
    Public ReadOnly Property colMin() As Integer
        Get
            colMin = Me._colMin
        End Get
    End Property
 
    Public Property MyVal() As String
        Set(ByVal value As String)
            _MyVal = value
        End Set
        Get
            MyVal = Me._MyVal
        End Get
    End Property
Je sais ajouter des objets UnFormat à mon arrayList

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
Dim newFormat As New UnFormat(strLine)
MyStruct.Add(newFormat)
je sais aller lire mes variables dans mon arrayList

Code : Sélectionner tout - Visualiser dans une fenêtre à part
Mid(donneeLine, 1, 3) = (DirectCast(MyStruct.Item(idxS), UnFormat).line.ToString
mais comment faire pour aller écrire, avec ma propriété Set, dans un objet UnFormat qui est dans mon arrayList ?

un truc du style

Code : Sélectionner tout - Visualiser dans une fenêtre à part
mystruct.Item(0).MyVal="123"
mais évidemment ça ne peut pas fonctionner.

Merci pour votre aide