public unsafe void ReplaceCharInString(ref String source, int index, Char newSymb){ if (index < 0 || index >= source.Length) throw new IndexOutOfRangeException(); fixed (char* ptr = source) ptr[index] = newSymb;}