Mega Code Archive

 
Categories / C# Tutorial / Attribute
 

Define a attribute for remark

using System; [AttributeUsage(AttributeTargets.All)]  public class MyAttribute : Attribute {    string remark;     public MyAttribute(string comment) {      remark = comment;    }      public string Remark {      get {        return remark;      }    }  }