System.String.Clone Method

Returns a reference to this instance of string.

Syntax

public object Clone ()

Returns

This instance of string.

Remarks

The return value is not an independent copy of this instance; it is simply another view of the same data. Use the string.Copy(string) or string.CopyTo(int, Char[], int, int) method to create a separate string object with the same value as this instance.

Because the string.Clone method simply returns the existing string instance, there is little reason to call it directly.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0