[Gambas-user] instance inline vs declaration and later instanciation

PICCORO McKAY Lenz mckaygerhard at ...626...
Sat Aug 20 21:59:05 CEST 2016


2016-08-18 14:53 GMT-04:00 Tobias Boege <taboege at ...626...>:

> The first way ensures that the variable contains a valid reference to a
> Collection object as soon as an object of the class you're writing is
> instantiated. This happens even before the constructor of that object is
> called.
>
> In the second case there is certainly an interval in the life of your
> object when the variable is Null and accessing it somewhere in your code
> will lead to an error.
>
tHATS! all?

well great, thanks, gambas its so easy to coding! and understang!



>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ------------------------------------------------------------
> ------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list