M
Manfred Braun
Hi All,
I try to list the values from an objects array member:
[ one of a's member is an array]
FieldInfo[] fis = a.GetType().GetFields(BindingFlags.Public |
BindingFlags.Instance);
for(int i = 0; i < fis.Length; i++)
{
Console.WriteLine("Name:{0},Value:{1}", fis.Name,
fis.GetValue(a));
}
I get System.String[]
I know I can figure out, if a field is an array:
if( fis.FieldType.IsArray) ...
But how to get the values ??? I have no problem to obtain simple values!
Any help would be great!
Best regards,
Manfred Braun
(Private)
Mannheim
Germany
mailto:[email protected]
(Remove the anti-spam-underscore to mail me!)
I try to list the values from an objects array member:
[ one of a's member is an array]
FieldInfo[] fis = a.GetType().GetFields(BindingFlags.Public |
BindingFlags.Instance);
for(int i = 0; i < fis.Length; i++)
{
Console.WriteLine("Name:{0},Value:{1}", fis.Name,
fis.GetValue(a));
}
I get System.String[]
I know I can figure out, if a field is an array:
if( fis.FieldType.IsArray) ...
But how to get the values ??? I have no problem to obtain simple values!
Any help would be great!
Best regards,
Manfred Braun
(Private)
Mannheim
Germany
mailto:[email protected]
(Remove the anti-spam-underscore to mail me!)