Replace char inside a string : String Replace : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » String Replace »

 

Replace char inside a string








    
 

using System;

public class TestStringsApp {
    public static void Main(string[] args) {
        string a = "strong";

        // Replace all 'o' with 'i'
        string b = a.Replace('o', 'i');
        Console.WriteLine(b);

        string c = b.Insert(3, "engthen");
        string d = c.ToUpper();
        Console.WriteLine(d);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» String Replace