1 /// <summary>2 ///custom features, which add some parameters than the system display Created by ZHANGQC 2015.08.193 /// </summary>4[AttributeUsage (Attributetargets.field |Attributetargets.property,5AllowMultiple =false, inherited =false)]6 Public Sealed classCustomattribute:attribute7 {8 9 Public stringName {Get;Set; }Ten One Public ObjectValue {Get;Set; } A - Public ObjectValue1 {Get;Set; } - the Public ObjectValue2 {Get;Set; } - - - /// <summary> + ///parameterless Constructor (enum notation [Custom (name= "xx", VALUE=XX1,VALUE1=XX2,VALUE2=XX3)]) Created by ZHANGQC 2015.08.19 - /// </summary> + PublicCustomAttribute () A { at } - - /// <summary> - ///Parametric constructor (enum notation [Custom ("xx", XX1,XX2,XX3)]) Created by ZHANGQC 2015.08.19 - /// </summary> - /// <param name= "name" ></param> in /// <param name= "value" ></param> - /// <param name= "value1" ></param> to /// <param name= "value2" ></param> + PublicCustomAttribute (stringNameObjectValueObjectValue1,Objectvalue2) - { the This. Name =name; * This. Value =value; $ This. Value1 =value1;Panax Notoginseng This. Value2 =value2; - } the + /// <summary> A ///Parametric constructor (enum notation [Custom ("XX")]) Created by ZHANGQC 2015.08.19 the /// </summary> + /// <param name= "name" ></param> - PublicCustomAttribute (stringname) $ { $ This. Name =name; - } - the /// <summary> - ///Parametric constructor (enum notation [Custom ("xx", xx1)]) Created by ZHANGQC 2015.08.19Wuyi /// </summary> the /// <param name= "name" ></param> - /// <param name= "value" ></param> Wu PublicCustomAttribute (stringNameObjectvalue) - { About This. Name =name; $ This. Value =value; - } - /// <summary> - ///Parametric constructor (enum notation [Custom ("xx", XX1,XX2)]) Created by ZHANGQC 2015.08.19 A /// </summary> + /// <param name= "name" ></param> the /// <param name= "value" ></param> - /// <param name= "value1" ></param> $ PublicCustomAttribute (stringNameObjectValueObjectvalue1) the { the This. Name =name; the This. Value =value; the } - in}
The
Custom attribute. Matching enumerations using the bar's