Implicit version of IsAssignableFrom?

前端 未结 2 1104
春和景丽
春和景丽 2021-01-05 17:02

In my code using reflections i wrote

if (f.FieldType.IsAssignableFrom(\"\".GetType()))

I have a class that has an implicit conversion to st

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-05 17:02

    if(... || TypeDescriptor.GetConverter(f).CanConvertTo("".GetType()))
    

提交回复
热议问题