c# 字符串移位问题 求代码

例如,现有一个字符串“123456789abcdefg”
在textbox1里输入13a,在textbox里转换为25d
即:第一个字符串向右移一位,第二个字符串移二位,第二个字符串移三位,以此类推

string str = "123456789abcdefg";
StringBuilder sb =new StringBuilder(); 
 for (int i = 0; i < textbox1.text.length ; i++ ){
      int index = str.indexOf(textbox1.text[i]);
      sb.Append(str[index+index]);
 }
 textbox2.text=sb.ToString();

for(char c : textbox1.text){
int index = c in string;
textbox.text += string(index + index);
}

private void textBox1_TextChanged(object sender, EventArgs e)
{
string str = "";
int index = 1;
foreach (char c in textBox1.Text)
{
//转换ascii码为字符
System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
byte[] byteArray = new byte[] { (byte)(c+index) };
str += asciiEncoding.GetString(byteArray);

            index++;
        }
        textBox.Text = str;
    }

            //上面是源代码,界面上为两个框,上面个是textBox1,双击控件就会生成textBox1_TextChanged事件响应函数
 private void textBox1_TextChanged(object sender, EventArgs e)
        {
            string str = "";
            int index = 1;
            foreach (char c in textBox1.Text)
            {
                //转换ascii码为字符
                System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
                byte[] byteArray = new byte[] { (byte)(c+index) };
                str += asciiEncoding.GetString(byteArray);

                index++;
            }
            textBox.Text = str;
        }