326
C# String Replace()
The C# Replace() method is used to get a new string in which all occurrences of a specified Unicode character in this string are replaced with another specified Unicode character.
There are two methods of Replace() method. You can replace string also.
Signature
Parameter
first: it is a first parameter of char type.
second: it is a second parameter of char type.
Return
It returns a string.
C# String Replace() Method Example
Output:
Hello C#
C# String Replace() Method Example 2
Output:
Cheers C#, Cheers .Net, Cheers TutorAspire
Next TopicC# String Split()