I tried something like:
but if I declare a variable of type MyClass and then I initialize it two times, mInitialized is always False.
I know I can use IsInitialized but I wish the class itself can deal with this eventuality.
Thank you
B4X:
' MyClass - Class Module
Sub Class_Globals
Private mInitialized As Boolean
End Sub
Public Sub Initialize(...)
If mInitialized Then
' ...
mInitialized = True
End Sub
but if I declare a variable of type MyClass and then I initialize it two times, mInitialized is always False.
I know I can use IsInitialized but I wish the class itself can deal with this eventuality.
Thank you