R
Robert Ludig
I have class that has a property wich has a custom typeconverter:
class A
{
private string _property;
[TypeConverter(typeof(MyTypeConverter))]
public string Property
{
get { return _property; }
}
}
How can I get an instance of this typeconverter? When I do
A a = new A();
TypeDescriptor.GetConverter(a);
I get an instance of the default Typeconverter attached to the class A
(as expected).
When I do
TypeDescriptor.GetConverter(TypeDescriptor.GetProperties(a)[0].GetValue(a));
I get an instance of the default Typeconverter of the class string (as
expected).
How would I retieve the instance of MyTypeConverter attached to
Property ?
class A
{
private string _property;
[TypeConverter(typeof(MyTypeConverter))]
public string Property
{
get { return _property; }
}
}
How can I get an instance of this typeconverter? When I do
A a = new A();
TypeDescriptor.GetConverter(a);
I get an instance of the default Typeconverter attached to the class A
(as expected).
When I do
TypeDescriptor.GetConverter(TypeDescriptor.GetProperties(a)[0].GetValue(a));
I get an instance of the default Typeconverter of the class string (as
expected).
How would I retieve the instance of MyTypeConverter attached to
Property ?