is there a way to know if the first reference of the object is data member of class ?

  • Thread starter Thread starter roni
  • Start date Start date
R

roni

my target is to create objects only as data member of class.
(but offcourse i can pass the objects reference to other objects)

my question:

how can i make sure that my object is create as data member and not as
temporary object
(in vb.net its mean, how can i know the my object created as private \public
memeber and not as dim )
 
Assuming you are referring to a class variable vs. a variable local to a
method, well, the simplest way would be to look at the source code and see
where the variable is declared. Not really sure what you are asking since
variables, whether they are method or class level variable, are stored on
the heap (or stack) and are treated exactly the same.
 
Back
Top