[Gambas-user] structure and class

T Lee Davidson t.lee.davidson at gmail.com
Tue Aug 8 15:28:44 CEST 2023

On 8/8/23 04:49, Marco Ancillotti wrote:
> Hi all,
> I have a working program that use a class that have only variables.
> Now I need do dynamic declare the class , is there a way to do so ?
> I can use structure but I learn that in gambas a structure is simply a class with only variables and the
> help say it's slow. is there another way to do it or I need to use structure ?
> thanks in advance,
> Marco.
> I need to create the class at runtime , I don't know the variable in the class needed before I run some code.
> Is there a way to create a new class type and add variables to it by code ?

I am also unsure what exactly you are trying to accomplish. So, about all I can say is ...

If you need a structure to which you can add variables and their values at run-time, why not simply use a Collection?


More information about the User mailing list