Re: Get name of instance of object
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Sun, 08 Oct 2006 20:26:51 -0400
Joanna Carter [TeamB] wrote:
"Jon Slaughter" <Jon_Slaughter@xxxxxxxxxxx> a écrit dans le message de news: 12iisgmj7i0hg29@xxxxxxxxxxxxxxxxxxxxx
| and it does this for references to these instances inside a string? I don't
| think so? The whole point is to make things make sense. I'm not trying to
| get something at runtime or in an assembly but to turn a variables name into
| text so I can display this at runtime. This is a similar idea to using
| enums.
I suggest that you are trying to do something that is not normal in other languages as well in C#. In over ten years, I certainly have never found a need to do what you are suggesting. If you really want to continue with this unusual quest, then I suggest you use straightforward search and replace in your source files to achieve any possible refactoring.
As someone has already mentioned, then it is possible via
the C/C++ preprocesser.
And it seen used occasionally. Not often but it happens.
It is not possible in current C#. And I doubt that it
will be possible in any of the future versions of C#.
It does not really fit well with the C# model.
Arne
.
- References:
- Get name of instance of object
- From: Jon Slaughter
- Re: Get name of instance of object
- From: Joanna Carter [TeamB]
- Re: Get name of instance of object
- From: Jon Slaughter
- Re: Get name of instance of object
- From: Joanna Carter [TeamB]
- Get name of instance of object
- Prev by Date: Re: How to make a cross post?
- Next by Date: Re: Properties
- Previous by thread: Re: Get name of instance of object
- Next by thread: Re: Get name of instance of object
- Index(es):
Relevant Pages
|