private void button1_Click(object sender, EventArgs e)
{
string str = textBox1.Text.Trim();
char[] myChar = str.ToCharArray();
for (int i = 0; i < myChar.Length; i++)
{
if (myChar[i].ToString() == textBox2.Text.Trim())
MessageBox.Show("字符串" + textBox2.Text.Trim() + "在" + textBox1.Text.Trim() + "中的位置为:" + i.ToString() + " ");
}
}