I have a class with a bunch of properties. Now I am going to add or eliminate some attributes to these properties at run time but i don't know how exactly i should do it.
The Class
Class myClass
{
//Other codes
public string DetailedAccountTitle
{
get { return detailedAccountTitle; }
set { detailedAccountTitle = value; }
}
//Other codes
}
Inside the caller
if ((bool)e.Value)
{
//Add the attribute
}
else
{
//Eliminate it
}
Now as you can see I am controlling an event inside the caller and i hope it adds the attribute if it gets true and eliminate it if it does not.