Servicestack.Core

时间:2017-04-08 22:21:56

标签: servicestack system.reflection

Servicestack.Core

我需要从反思中获取财产:

PropertyInfo property = branch.GetType().GetProperty("Prop");

但我得到了这个冲突:

  

以下方法或属性之间的调用不明确:   ' ServiceStack.PlatformExtensions.GetProperty(System.Type,string)'和   ' System.Reflection.TypeExtensions.GetProperty(System.Type,string)'

我该如何解决这个问题?

谢谢!

1 个答案:

答案 0 :(得分:2)

删除对System.Reflection.TypeExtensions的包引用或使用完全限定的方法System.Reflection.TypeExtensions.GetProperty()