```
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();
```