I don't know if there is a easier way to do this but :
If you want to replace all specified chars in string :
Code:
string myString = "Hello World!";
Console.WriteLine("This is what it's at the start : " + myString);
myString = myString.Replace("l", "x");
Console.WriteLine("nThis is what it's after the change : " + myString);
//This is what it's at the start : Hello World
//This is what it's after the change Hexxo Worxd
If you want to replace a specified character at specified place :
Code:
string myString = "Hello World!";
char[] Array = myString.ToCharArray();
Array[0] = 'X';
myString = "";
for (int i = 0; i < Array.Length; i++)
myString += (char)Array[i];
Console.WriteLine(myString);
// Output : Xello World!
Hope it helps to right direction atleast. :P