M
Martin Eckart
Hi guys,
I have a class which contains ~ 200 properties. Out of those 200 properties
I need to access 10 (which I know beforehand already) via reflection in
another class.
Currently I am doing the following with my context object which represents
the class containing the 200 properties:
Type t = context.GetType();
foreach (PropertyInfo prop in t.GetProperties()
This brings me all 200 properties. Is there a way to use the BindingFlags
parameter and configure in the context class which properties so be used and
which not? Something like that:
[UseForReflectionAttribute]
public string frmOID
{
get { return "DoV1"; }
}
Thanks,
Martin
I have a class which contains ~ 200 properties. Out of those 200 properties
I need to access 10 (which I know beforehand already) via reflection in
another class.
Currently I am doing the following with my context object which represents
the class containing the 200 properties:
Type t = context.GetType();
foreach (PropertyInfo prop in t.GetProperties()
This brings me all 200 properties. Is there a way to use the BindingFlags
parameter and configure in the context class which properties so be used and
which not? Something like that:
[UseForReflectionAttribute]
public string frmOID
{
get { return "DoV1"; }
}
Thanks,
Martin