I cannot find a .net core equivalent for calling GetCustomAttributes on an assembly object. I see there is CustomAttributes property, but this doesn't return instances of the custom attributes, but rather metadata about the attributes. How can I retrieve the actual attribute instance?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There's a GetCustomAttributes
extension method. Just add using System.Reflection
.