Detecting inheritance for custom properties
Posted: Mon 1. May 2017, 21:06
I've defined some custom text properties, and would like to iterate through the properties of an ObjectProxy and execute some code if they inherit from one of these custom properties. I'm trying something like...
... but info.DataType is always giving me Text. Is there a way to check for what the name of the inherited custom property is?
- Code: Select all
List<string> MyCustomPropertyNames = new List<string> {"foo","bar"};
foreach (var property in obj.GetAvailableProperties())
{
var info = obj.GetPropertyInfo(property);
if (MyCustomPropertyNames.Contains(info.DataType.ToString()))
{
...
}
}
... but info.DataType is always giving me Text. Is there a way to check for what the name of the inherited custom property is?