csharp insert character into string at position

Code Example - csharp insert character into string at position

                
                        //Insert method returns a copy, it does not alter the string since strings are immutable
string str = "abc";
str = str.Insert(2, "XYZ"); //str == "abXYZc"
                    
                
 

csharp add char to string

                        
                                string s = "";
s = s + myChar.ToString(); // Where myChar is the char to be added
                            
                        
 

string.insert csharp

                        
                                public string Insert(int Indexvalue, string value)