AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
``` string stra = "abcdefghijk"; string strtempa = "c"; string strtempb = "j"; //我们要求c---g之间的字符串,也就是:defghi //求得strtempa 和 strtempb 出现的位置: int IndexofA = stra.IndexOf(strtempa); int IndexofB = stra.IndexOf(strtempb); string Ru = stra.Substring(IndexofA + 1, IndexofB - IndexofA -1); Console.WriteLine("Ru = " + Ru); //----这就是你要的结果 Console.ReadLine(); ```