RE: Convert String to variable contained in string
- From: gmccallum <gmccallum@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Apr 2005 11:27:01 -0700
The reason I am doing this approach to a problem is because I
don't know how to create a reference to a value type.
For example in C++:
int x = 10;
int *y = &x;
When I update x, I want to be able to see the change in y.
In C# because int is a value type when I say:
int x = 10;
int y = x;
it creates a copy of x and puts it in y.
Is there a way to do this without having to use unsafe construct?
It still would be useful to be able to get the value of a variable in a
string like
string varName = "MyClass.intvalue";
would like to get value of MyClass.intvalue.
So an answer to both issues would be really appreciated.
-Gregory McCallum
.
- Follow-Ups:
- Re: Convert String to variable contained in string
- From: Bruce Wood
- Re: Convert String to variable contained in string
- From: Nicholas Paldino [.NET/C# MVP]
- Re: Convert String to variable contained in string
- References:
- Convert String to variable contained in string
- From: gmccallum
- Convert String to variable contained in string
- Prev by Date: Re: Accessor Issue
- Next by Date: reliable and cheap asp.net hoster with DB support?
- Previous by thread: Convert String to variable contained in string
- Next by thread: Re: Convert String to variable contained in string
- Index(es):
Relevant Pages
|