Re: class instance question

Ryan Heath <[email protected]>
Newsgroups gmane.comp.windows.off-topic
Message-ID <[email protected]>
Interesting, I do not know the answer, but instance names can be optimized
away.
Lets say you have a solution for this problem, but then at runtime 'Fluffy'
may be named as 'Register12' or 'Stack@17' or maybe, just boringly, 'null'
;)

// Ryan

On Thu, Oct 21, 2010 at 11:36 PM, John Smith <[email protected]> wrote:

>
>
> Hi,
> Is there a way to programmatically determine the name of an instance
> of a class without having to hardcode the information?
>
> For example if I have a 'Cat' class and I have an instance of that
> class named 'Fluffy' assuming the Cat class has a 'Name' member
> variable that can hold the information, is there a way to make
> 'Fluffy' determine its own name without having to tell it the
> information? Just curious... Thanks.
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.