K
Ken Varn
Not sure if this is possible or not or if there is a better method for doing
this that I am not seeing. Anyhow, is there anyway to get the declared name
of an object that is passed to a function? See below:
public class TestClass
{
public String GetObjectName(Object O)
{
return // Want to be able to determine that O's declared name is
"MyString" as passed by TestFunc()
}
}
void TestFunc()
{
TestClass Test = new TestClass();
String MyString = "text";
String Name;
Name = Test.GetObjectName(MyString);
}
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
this that I am not seeing. Anyhow, is there anyway to get the declared name
of an object that is passed to a function? See below:
public class TestClass
{
public String GetObjectName(Object O)
{
return // Want to be able to determine that O's declared name is
"MyString" as passed by TestFunc()
}
}
void TestFunc()
{
TestClass Test = new TestClass();
String MyString = "text";
String Name;
Name = Test.GetObjectName(MyString);
}
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------