Access to the value of a Custom Attribute

前端 未结 7 2337
夕颜
夕颜 2021-01-03 20:17

I\'ve got this custom attribute:

[AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited = true)]
class MethodTestingAttibute : Attribute
{           


        
7条回答
  •  余生分开走
    2021-01-03 20:36

    Please see the following link, it gets the attribute of an enum but you can customize is to get your custom attribute.

    Getting attribute of Enum

提交回复
热议问题