string s = "20120819"; s = s.Insert(4, "年"); s = s.Insert(7, "月"); s = s.Insert(10, "日"); int slen=s.Length ; s = s + " 本次字符串总长度为" + slen; textBox1.Text = s;
string s = "20120819"; s = s.Insert(s.IndexOf("08"), "年"); s = s.Insert(s.IndexOf("19"), "月"); s = s+"日"; int slen=s.Length ; s = s + " 本次字符串总长度为" + slen+"***"; textBox1.Text = s;