S
Stefan Hoffmann
hi,
the following implementations work:
public class NullSafeCollection: System.Collections.CollectionBase,
System.ICloneable
{
object System.IClonable.Clone()
{
NullSafeCollection clone = new NullSafeCollection();
for (int i = 0; i < this.Count; i++)
clone.Add(this);
return clone;
}
}
public class NullSafeCollection: System.Collections.CollectionBase,
System.ICloneable
{
public object Clone()
{
NullSafeCollection clone = new NullSafeCollection();
for (int i = 0; i < this.Count; i++)
clone.Add(this);
return clone;
}
}
Why can i not use 'public object System.ICloneable.Clone()'?
So what is the difference between naming the methods
'System.IClonable.Clone()' and 'Clone()'?
mfG
--> stefan <--
the following implementations work:
public class NullSafeCollection: System.Collections.CollectionBase,
System.ICloneable
{
object System.IClonable.Clone()
{
NullSafeCollection clone = new NullSafeCollection();
for (int i = 0; i < this.Count; i++)
clone.Add(this);
return clone;
}
}
public class NullSafeCollection: System.Collections.CollectionBase,
System.ICloneable
{
public object Clone()
{
NullSafeCollection clone = new NullSafeCollection();
for (int i = 0; i < this.Count; i++)
clone.Add(this);
return clone;
}
}
Why can i not use 'public object System.ICloneable.Clone()'?
So what is the difference between naming the methods
'System.IClonable.Clone()' and 'Clone()'?
mfG
--> stefan <--