How to get the type of a struct member?
Hi there! How are you?
I have a struct that I created that looks like this:
struct UI_Descriptor //(906 Bytes)
{
unsigned char mInput_Gain_L1;
unsigned int mChannel_Attack_Txtb[4];
float BW_OUT1_EQ[24];
};
UI_Descriptor Slot_1;
UI_Descriptor Slot_2;
UI_Descriptor Slot_3;
I need to know what's the type of each member. So I tested the GetType() function but without success. For example:
float whatever=0;
Type^ varType;
varType = whatever.GetType();
textBox1->Text = varType->Name->ToString();
That works fine. However, if I try to get the type of one of my struct members, it won't compile, for example:
Type^ varType;
varType = Slot_1.BW_OUT1_EQ.GetType();
textBox1->Text = varType->Name->ToString();
Is there anyway to get the type of my struct members? How about the member that is an array, would that be the same?
Thank you very much!
EDIT: Problem solved! I was mistaken trying to get the type of the array instead of one of its elements. It was my distraction, I apologize for the useless post. :blush: I'd like to ask to the Moderator to remove this thread please. Thank you!
Best Regards,
Fernando