Use a StringBuilder
:
StringBuilder sb = new StringBuilder(theString);
sb[index] = newChar;
theString = sb.ToString();
More Related Contents:
- De-serializing json format string
- Split and cut string in C# [closed]
- How to add a char every X specific char in C# [closed]
- Using C# to check if string contains a string in string array
- Compression/Decompression string with C#
- Best way to repeat a character in C#
- C# List to string with delimiter
- What is the difference between a mutable and immutable string in C#?
- How to check if a String contains any of some strings
- Verifying that a string contains only letters in C#
- What’s so bad about building XML with string concatenation?
- Best way to split string into lines
- Memory Efficiency and Performance of String.Replace .NET Framework
- Parse C# string to DateTime
- What’s a good way of doing string templating in .NET?
- How can I put quotes in a string?
- Convert binary string into integer
- Split string into string array of single characters
- DateTime conversion from string C#
- C#: how to get first char of a string?
- C# hex to ascii
- Why only literal strings saved in the intern pool by default?
- Why doesn’t VS 2008 display extension methods in Intellisense for String class
- Search for a string in Enum and return the Enum
- Extract only right most n letters from a string
- Checking for null before ToString()
- Get text between 2 html tags c#
- Adding a newline into a string in C#
- Using StreamReader to check if a file contains a string
- How can I create all possible combinations for a set of words without repetition?