Assuming I have the following structure within a class:
class myClass
{
public struct Action
{
public const String REQUIRED = "T";
public const String IGNORE = "F";
public const String OPTIONAL = "O";
}
... code ...
}
How can I use reflection to access the elements of the
structure?
I can get the structure as such:
typeof(myClass) .GetMember("Act ion",
BindingFlags.Pu blic|BindingFla gs.Static), but I am
stymied on how to delve into it.
Cheers, Ian Williamson
class myClass
{
public struct Action
{
public const String REQUIRED = "T";
public const String IGNORE = "F";
public const String OPTIONAL = "O";
}
... code ...
}
How can I use reflection to access the elements of the
structure?
I can get the structure as such:
typeof(myClass) .GetMember("Act ion",
BindingFlags.Pu blic|BindingFla gs.Static), but I am
stymied on how to delve into it.
Cheers, Ian Williamson
Comment