C# String Clone() Method
C# String Clone()
Clone() method is used to clone the string object, which returns another copy of same data.
The return type of
Clone() method is object.
Note: This type of cloning is called shallow copy, i.e, any changes made to any string object will not affect the other.
This method does not take any parameter.
|Object||Returns a reference to this instance of String.|
In the following example, any changes made to Actual string (s1) will not affect the clone string (s2).
Hi Developers, we almost covered 90% of String functions and Interview Question on C# with examples for quick and easy learning.
We are working to cover every Single Concept in C#.
Please do google search for:
Join Our Channel
This channel is primarily useful for Full Stack Web Developer.