String.Copy(String) Method is used to create a new instance of String with the same value as a specified String. In other words, this method is used to copy the data of one string into a new string.
The new string contains same data like an original string but represents a different object reference.
public static string Copy (string value);
Parameter: Here value is the string which is to be copied.
Return Value: The return type of this method is System.String. This method returns a new string that contains the data similar to the value.
Exception: This method will give ArgumentNullException if the value is null.
Below given are some examples to understand the implementation in a better way:
Original String strA: GeeksforGeeks Copied String strB: GeeksforGeeks
Original string A: GeeksforGeeks Original string B: C# Tutorials After copy: Value of string A: GeeksforGeeks Value of string B: GeeksforGeeks Is reference of strings is equal : False