Using reflection you can access uninstantiated classes, but I do not think
that you can access objects via a string. References to objects to not have
names, only the variable that holds then does. What you might try doing is
using a Hashtable which can store your object references and let you access
then via a named identifier.
"thejackofall" <th**********@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
Hi.
I have a tricky question. Suppose I have a member or local variable named
XYZ.
I want to reference the object using a string, "XYZ".
In code, I want to do the following.
Checkbox MyCheckbox = (Checkbox) doSomething("XYZ");
Is this possible in .NET? If so, how can I do it?
Thanks. Stay cool.