totally beside the implemetation details another option would be to have an interface spelling out the differences of the action, for instance 2 methods named DeepCopy and ShallowCopy. Goes a bit against polymorphism as a concept, but does not require you to have a mental map on which objects .Clone has DeepCopy functionality added by clearly spelling out the action wanted. More clarity, less magic...
YMMV
thomas
>>That can be implemented in the Data class
>>In the Clone() method - first do the MemberWiseClone(), then copy the dataset
>>
http://msdn.microsoft.com/en-us/library/system.icloneable(v=vs.110).aspx>>
>>
>>Notes to Implementers
>>The ICloneable interface simply requires that your implementation of the Clone method return a copy of the current object instance. It does not specify whether the cloning operation performs a deep copy, a shallow copy, or something in between.
>>>>
>>
>> class Test_Clone
>> {
>> internal static void Go()
>> {
>>
>> Data d = new Data();
>> // do some changes to d.oDataSet
>>
>> Data cloned = d.Clone() as Data;
>> }
>> }
>>
>> class Data : ICloneable
>> {
>> internal DataSet oDataSet = new DataSet();
>> internal int Count = 4;
>>
>> public object Clone()
>> {
>> Data cloned = (Data) MemberwiseClone();
>> cloned.oDataSet = cloned.oDataSet.Copy();
>>
>> return cloned;
>> }
>> }
>>
>
>That is a very interesting approach. Thanks