Overwrite customattribute on derived class

后端 未结 3 1365
心在旅途
心在旅途 2021-01-08 00:52

We have a custom attribute

[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class CustomDesignerAttribute: Attribute

the

3条回答
  •  清歌不尽
    2021-01-08 01:47

    use [AttributeUsage(Inherited=false)] to prevent the attribute being inherited by the derived class.

提交回复
热议问题