Avoiding an ambiguous match exception

后端 未结 1 1042
隐瞒了意图╮
隐瞒了意图╮ 2020-12-08 00:04

I am invoking a static method Parse on a type via reflection because I do not know the type of the object at compile-time (I do know, however, it has a Parse

相关标签:
1条回答
  • 2020-12-08 00:20

    Use this overload and use

    returnType.GetMethod("Parse", new [] {typeof(string)})
    
    0 讨论(0)
提交回复
热议问题