|
-
August 20th, 2012, 04:59 AM
#1
Get Name of struct variables and of its all parents
Hi,
I am having problems in retrieving names of variables of struct in a bottom up manner.
For e.g. if my struct is:
Code:
struct NumberOfKids_t
{
int Daughters;
int Sons;
}
struct Customer_t
{
string Name;
string Age;
NumberOfKids_t Childern;
}
Customer_t MyCustomer;
It works fine if I try to retrive name of variables (using reflection) but it does not give me the complete name. For e.g.
for variable Age in Customer_t, I get "Age" from MemberInfo, I wish here to get "MyCustomer.Name"
Similarly, I try to retrive name of variable Sons, I get only Sons and I wish to retrieve "MyCustomer.Childern.Sons"
Any idea how to do this.
Thanks
Ricky
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|