Clad49
Messages postés265Date d'inscriptiondimanche 3 août 2003StatutMembreDernière intervention29 mars 2010
-
20 janv. 2007 à 14:44
Utilisateur anonyme -
20 janv. 2007 à 15:45
Bonjour !
Voila j'ai un tableau a plusieur dimention déclaré comme ceci :
Public Structure tformat
Dim tId As String
Dim tNom As String
Dim tPrenom As String
Dim tEmail As String
...
End Structure
Public Tableau() As tformat
Et j'aurai voulu savoir comment faire pour supprimer des éléments ?
Je sais que c'est faisable avec Array.Copy mais je ne sais pas si c'est faisable dans mon cas !
(du moins je n'y arrive pas :s )
Private Sub RemoveItem(ByRef Tab() As tformat, ByVal Index As Integer)
System.Array.Copy(Tab, Index + 1, Tab, Index, Tab.Length - Index - 1)
System.Array.Resize(Of tformat)(Tab, Tab.Length - 1)
End Sub,
Private Function Comparetformat(ByVal x As tformat, ByVal y As tformat) As Integer
If x.tId < y.tId Then Return -1
If x.tId = y.tId Then Return 0
If x.tId > y.tId Then Return 1
End Function,