how do I set a character at an index in a string in c#?

后端 未结 7 1261
生来不讨喜
生来不讨喜 2020-11-28 16:28
someString[someRandomIdx] = \'g\';

will give me an error.

How do I achieve the above?

相关标签:
7条回答
  • 2020-11-28 17:12

    you can also use Insert() method e.g. somestring.Insert(index,data)

    0 讨论(0)
提交回复
热议问题