Servicestack.Core
我需要从反思中获取财产:
PropertyInfo property = branch.GetType().GetProperty("Prop");
但我得到了这个冲突:
以下方法或属性之间的调用不明确: ' ServiceStack.PlatformExtensions.GetProperty(System.Type,string)'和 ' System.Reflection.TypeExtensions.GetProperty(System.Type,string)'
我该如何解决这个问题?
谢谢!
答案 0 :(得分:2)
删除对System.Reflection.TypeExtensions
的包引用或使用完全限定的方法System.Reflection.TypeExtensions.GetProperty()