469,626 Members | 1,070 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Selective copy and setting and attribute for an object

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.

Nov 16 '05 #1
1 1414
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Julia" <co********@012.net.il> wrote in message
news:eA**************@TK2MSFTNGP10.phx.gbl...
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.

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jean Stax | last post: by
5 posts views Thread by Lyners | last post: by
8 posts views Thread by serge calderara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.