0

Possible Duplicate:
How to set attributes values using reflection

How can I set the value of custom attribute, this custom attribute is used in the member of class object. Consider below member with its attribute.

[DataMember]
    [Decorater(false, false)]
    [DecroraterUpdt(false, false)]
    [PricingSchema(false, false)]
    public string UniqueID
    {
        get { return uniqueId; }
        set { uniqueId = value; }
    }

I want to set Pricing schema attribute's value.

Thanks

Community
  • 1
  • 1
Jits
  • 712
  • 7
  • 11

2 Answers2

0

What is the property name?

The syntax is [AttributeName(constructorValues, propertyValues)]

i.e.

[PricingSchema(false, false, Property1="My Property", Property2="Prop 2")]
DoctorMick
  • 6,703
  • 28
  • 26
-1

Its not possible please check answer on this How to set attributes values using reflection

Community
  • 1
  • 1
Deepesh
  • 5,346
  • 6
  • 30
  • 45