Just implement IClonable and implement the method. It really is
nothing special when all your objects implement it this way.
If you really have a shitload of properties then you could for exampe
use AutoMapper to perform the cloning but I would advise to just do
the mapping by hand.
Example:
public class CloneMePlease : ICloneable
{
public int Id { get; protected set; }
public string X { get; set; }
public string Y { get; set; }
public string Z { get; set; }
public CloneMePlease Clone()
{
return new CloneMePlease
{
X = X,
Y = Y,
Z = Z
};
}
object ICloneable.Clone()
{
return Clone();
}
}
Hope this helps.
--
Ramon
> --
> You received this message because you are subscribed to the Google Groups "nhusers" group.
> To post to this group, send email to nhu...@googlegroups.com.
> To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
>
>
--
Ramon