Or more specifically
1) Can I assign a type descriptor to a property
2) If so, what’s the best way of getting the type converter at runtime.
Basically I have configuration objects that are populated using reflection. So far this works just for simple types (string, int, datetime) but I wanted to support converting comma separated lists to List.
So far I’ve achieved this by deriving a custom type “ConvertableList<T>” from List<T> and decorating that with my custom type converter.
You can associate
TypeConverters to existing types like:(somewhere during startup)
Then to get the converter, the standard code should work:
or: