汇编时GetCustomAttribute的.net核心等价物?

时间:2016-07-08 09:27:38

标签: reflection .net-core

我在组装对象上调用GetCustomAttributes找不到.net核心等价物。我看到有CustomAttributes属性,但这并不返回自定义属性的实例,而是返回有关属性的元数据。如何检索实际的属性实例?

1 个答案:

答案 0 :(得分:1)

有一个GetCustomAttributes扩展方法。只需添加using System.Reflection

相关问题