eleves.add(new eleve with {.Nom "Nom1", .Prenom "Prenom1", .Classe = "Classe1", .Sexe = "M", .Date_Naiss = "Date1"}) dim nom1 as string = eleves.item(0).Nom
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<ELEVE ELEVE_ID="173622" ELENOET="5249">
Public Class Eleve Dim Nom As String Dim Prenom As String Dim Classe As String Dim Date_Naiss As String Dim Sexe As String End Class
Dim eleves As New List(Of Eleve) eleves.Add(New Eleve With {.Nom "Nom1", .Prenom "Prenom1", .Classe = "Classe1", .Sexe = "M", .Date_Naiss = "Date1"})
Erreur 1 'Eleve.Nom' n'est pas accessible dans ce contexte, car il est 'Private'.
Public Class Form1 Public Class Eleve Dim Nom As String Dim Prenom As String End Class Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim eleves As New List(Of Eleve) eleves.Add(New Eleve With {.Nom "Nom1", .Prenom "Prenom1"}) End Sub End Class
Public Class Eleve Dim Nom As String Dim Prenom As String End Class Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim eleves As New List(Of Eleve) eleves.Add(New Eleve With {.Nom "Nom1", .Prenom "Prenom1"}) End Sub End Class