c# /MVC设置类的自定义特性

 

public class MarkStaticAttribute:Attribute
    {
       public MarkStaticAttribute(bool mark=true)
       {
           _IsMark = mark;
       }

       private bool _IsMark { set; get; }

       /// 
       /// 是否标记
       /// 
       public bool IsMark
       {
           get { return _IsMark; }
           set { _IsMark = value; }
       }
    }


 
posted @ 2019-07-25 15:02  keke..lele  阅读(677)  评论(0编辑  收藏  举报