Define a attribute for remark : AttributeUsage : Attribute C# Examples


C# Examples » Attribute » AttributeUsage »

 

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;  
        }  
    }  
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Attribute
» AttributeUsage