asp.net.ph

CultureInfo.Clone Method

System.Globalization Namespace   CultureInfo Class


Creates a copy of the current CultureInfo.

[ VB ]
Overridable Public Function Clone ( ) As Object Implements _
   ICloneable.Clone

[ C# ]
public virtual object Clone ( );

[ C++ ]
public: virtual Object* Clone ( );

[ JScript ]
function Clone ( ) : Object;

Return Value

A copy of the current CultureInfo.

Implements

ICloneable.Clone

Remarks

The clone is writable even if the original CultureInfo 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.

CultureInfo.Clone is a shallow copy with exceptions. The objects returned by the NumberFormat and the DateTimeFormat properties are also cloned, so that the CultureInfo clone can modify the properties of NumberFormat and DateTimeFormat without affecting the original CultureInfo.

See Also

CultureInfo Members   Object Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph