Export (0) Print
Expand All

Encoding.Clone Method

Note: This method is new in the .NET Framework version 2.0.

When overridden in a derived class, creates a shallow copy of the current Encoding object.

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)

[ComVisibleAttribute(false)] 
public virtual Object Clone ()
/** @attribute ComVisibleAttribute(false) */ 
public Object Clone ()
ComVisibleAttribute(false) 
public function Clone () : Object

Return Value

A copy of the current Encoding object.

The clone is writable even if the original Encoding object is read-only; therefore, the properties of the clone can be modified.

A shallow copy of an object is a copy of the object only. If the object contains references to other objects, the shallow copy does not create copies of the referred objects. It refers to the original objects instead. In contrast, a deep copy of an object creates a copy of the object and a copy of everything directly or indirectly referenced by that object.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

.NET Compact Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft