Selective copy and setting and attribute for an object

  • Thread starter Thread starter Julia
  • Start date Start date
J

Julia

Hi,

I am looking for a way with which I can selectively copy properties of an
object.
in some circumstances I need to copy all properties
and in the other I need to copy only some of them(always the same)


I am thinking to use attribute if the property should be copy

and I wonder can I set and change an attribute of an object at run time
so when I need to copy all properties I set an attribute for the object
[CopyAll]?


Thanks in advance.
 
Julia,

You can not apply attributes at run time.

Attributes would be a good way to go for what you are doing, for when
you want to copy specific properties all the time.

If you want instance based input (the attribute is type based), then
have an interface that you could query for on the object which indicates
whether or not you have to copy everything.

Hope this helps.
 
Back
Top