Link to home
Start Free TrialLog in
Avatar of Barbless
Barbless

asked on

Is there a way to extract name of the instantiated object?

Hello all, I have the following hypothetical code snippet:

NumericUpDown MyNud = new NumericUpdown();
string s = GetName(MyNud);
...
...
private string GetName (NumericUpDown nud)
{
     string returnString = string.Empty;
   
     // What do I have to do, or is this possible at all, so that
     // returnString can be set to "MyNud" ?
   
    return returnString;    
}
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Barbless
Barbless

ASKER

Silly me, the info is right in front of me, and I wasted so much time looking into Reflection for it. Thanks Bob.