Searched Question

If a class has implemented ICloneable, what does this mean?

+3
source share
4 answers

That is the method IClonable.Clone. The documentation says that the method is designed to clone objects. The documentation notes that the clone can be deep or shallow. It is also noted that the resulting type must be of the same type as the cloned object, but there is no guarantee in the type system that this is true.

To summarize, he does not offer many hard promises, but the goal is to create independent clones.

+6
source

Basically, it just lets you clone a class:

http://msdn.microsoft.com/en-us/library/system.icloneable.aspx

. Clone .

Microsoft:

public object Clone()
{
    return this.MemberwiseClone();
}
0

, Clone, , . , , ICloneable, .

0

ICloneable , (, , Foo, ICloneable). , Foo, CloneableFoo, AdvancedFoo CloneableAdvancedFoo, Foo, , , , , , Foo Foo.

, , IClonable Foo, IClonable Foo, typecasts, , , . ICloneable (Of T As ICloneable (Of T)), "Clone", T, "Self", T ( , , ICloneable Of Foo " Foo " "). , , , .

0

Source: https://habr.com/ru/post/1777300/


All Articles