Dynamic arrays trouble

cjguajardo

Member
Licensed User
Longtime User
In CSharp i can do this:
B4X:
struct Asignatura{
   string Nombre;
   int idAsig ;
   String Color;
}

List<myStruct> a= new List<MyStruct>();

but i tried to do on B4A with this:
B4X:
Type Asignatura(Nombre As String, idAsig As Int, Color As String)
Dim a As List<Asignatura>
But i get an error.

Exists any form to do the same with B4A?
Is it possible to do?

Thanks in advance.
 

kickaha

Well-Known Member
Licensed User
Longtime User
A List can hold any object, you do not need to specify the object in the list declaration, so
B4X:
Dim a as List

Will work.
 
Upvote 0
Top