问题
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.
来源:https://stackoverflow.com/questions/38263244/net-core-equivalent-for-getcustomattribute-on-assembly