How to cast implicitly on a reflected method call

前端 未结 3 906
我寻月下人不归
我寻月下人不归 2021-02-18 13:08

I have a class Thing that is implicitly castable from a string. When I call a method with a Thing parameter directly the cast from s

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-18 13:55

    Found an answer which uses a TypeConverter (as Saeed mentions)
    Seems to do the job.

    TypeConverter For Implicit Conversion when using reflection

提交回复
热议问题