-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathICloneable.xml
120 lines (114 loc) · 8.1 KB
/
ICloneable.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<Type Name="ICloneable" FullName="System.ICloneable">
<TypeSignature Language="C#" Value="public interface ICloneable" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract ICloneable" FrameworkAlternate="net-5.0;net-6.0;net-7.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1" />
<TypeSignature Language="DocId" Value="T:System.ICloneable" />
<TypeSignature Language="VB.NET" Value="Public Interface ICloneable" />
<TypeSignature Language="F#" Value="type ICloneable = interface" />
<TypeSignature Language="C++ CLI" Value="public interface class ICloneable" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit ICloneable" FrameworkAlternate="net-8.0;net-9.0" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
</TypeForwardingChain>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Runtime.InteropServices.ComVisible(true)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.InteropServices.ComVisible(true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Supports cloning, which creates a new instance of a class with the same value as an existing instance.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ICloneable> interface enables you to provide a customized implementation that creates a copy of an existing object. The <xref:System.ICloneable> interface contains one member, the <xref:System.ICloneable.Clone%2A> method, which is intended to provide cloning support beyond that supplied by <xref:System.Object.MemberwiseClone%2A?displayProperty=nameWithType>. For more information about cloning, deep versus shallow copies, and examples, see the <xref:System.Object.MemberwiseClone%2A?displayProperty=nameWithType> method.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The <see cref="T:System.ICloneable" /> interface simply requires that your implementation of the <see cref="M:System.ICloneable.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. Nor does it require all property values of the original instance to be copied to the new instance. For example, the <see cref="M:System.Globalization.NumberFormatInfo.Clone" /> method performs a shallow copy of all properties except the <see cref="P:System.Globalization.NumberFormatInfo.IsReadOnly" /> property; it always sets this property value to <see langword="false" /> in the cloned object. Because callers of <see cref="M:System.ICloneable.Clone" /> cannot depend on the method performing a predictable cloning operation, we recommend that <see cref="T:System.ICloneable" /> not be implemented in public APIs.</para>
</block>
<altmember cref="M:System.Object.MemberwiseClone" />
</Docs>
<Members>
<Member MemberName="Clone">
<MemberSignature Language="C#" Value="public object Clone ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object Clone() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ICloneable.Clone" />
<MemberSignature Language="VB.NET" Value="Public Function Clone () As Object" />
<MemberSignature Language="F#" Value="abstract member Clone : unit -> obj" Usage="iCloneable.Clone " />
<MemberSignature Language="C++ CLI" Value="public:
 System::Object ^ Clone();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a new object that is a copy of the current instance.</summary>
<returns>A new object that is a copy of this instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The resulting clone must be of the same type as, or compatible with, the original instance.
An implementation of <xref:System.ICloneable.Clone%2A> can perform either a deep copy or a shallow copy. In a deep copy, all objects are duplicated; in a shallow copy, only the top-level objects are duplicated and the lower levels contain references. Because callers of <xref:System.ICloneable.Clone%2A> cannot depend on the method performing a predictable cloning operation, we recommend that <xref:System.ICloneable> not be implemented in public APIs.
See <xref:System.Object.MemberwiseClone%2A?displayProperty=nameWithType> for more information on cloning, deep versus shallow copies, and examples.
]]></format>
</remarks>
<altmember cref="M:System.Object.MemberwiseClone" />
</Docs>
</Member>
</Members>
</Type>