Replace characters : String Insert Replace « String « C# / CSharp Tutorial






using System;  
  
class MainClass {  
  public static void Main() {  
    string str = "This is a test"; 
 
    Console.WriteLine("Original string: " + str); 
     
    // Replace characters 
    str = str.Replace('a', 'X'); 
    Console.WriteLine(str); 
 
  } 
}
Original string: This is a test
This is X test








5.15.String Insert Replace
5.15.1.String Inserting
5.15.2.Replace string
5.15.3.Replace characters
5.15.4.Replace substring
5.15.5.Reversing Characters
5.15.6.Reversing a String