Export (0) Print
Expand All

Encoding.Clone Method

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
Not applicable.

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 Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

.NET Compact Framework

Supported in: 2.0

XNA Framework

Supported in: 1.0

Community Additions

ADD
Show:
© 2014 Microsoft