I have a class, Account, with properties such as AccountID, Name, etc. One of its properties is Contacts() which is an array of Contact class. So it looks something like this:
The Contact class contains typical FirstName, LastName, EmailAddress, etc, field. In my object model, an Account can have a variable number of Contacts.
So when I create a new object of type Account, I also need to append Contact class objects to the Account.Contacts() array. But I can't work out how to do this?
B4X:
'Account class
Sub Class_Globals
Public AccountID As Int
Public Name As String
Public Contacts() As Contact
End Sub
The Contact class contains typical FirstName, LastName, EmailAddress, etc, field. In my object model, an Account can have a variable number of Contacts.
So when I create a new object of type Account, I also need to append Contact class objects to the Account.Contacts() array. But I can't work out how to do this?