J'ai une instance d'objet à laquelle j'accède avec le ME comme il accède à l'objet instancié. J'ai une méthode qui récupère une collection de ces objets et je souhaite affecter le premier à l'objet instancié.
Voici une partie du code
Dim Books As New BookCollection(True)
Books.ListByThemeFeatured(ThemeID, 1) ' Fills the collection
If Books.Count > 0 Then
Me = Books(0) ' Should set the first item to the current object
End If
Est-ce possible ?
EDIT : Me fait référence à la classe qui a été instanciée. Dans ce cas, il s'agit d'une classe BookEntity. Cette méthode aurait été appelée en utilisant le code suivant
Dim Book As New BookEntity
Book.FeaturedBook() ' Should fill the book entity with a featured book