我将以下函数从 vb.net 转换为 c#,但我无法弄清楚。
错误 4 当前上下文中不存在名称“字符串”
public string GetBetween(string StringText)
{
string functionReturnValue = null;
string TMP = null;
string FromS = null;
string ToS = null;
FromS = "<Modulus>";
ToS = "</Modulus>";
TMP = Strings.Mid(StringText, Strings.InStr(StringText, FromS) + Strings.Len(FromS), Strings.Len(StringText));
TMP = Strings.Left(TMP, Strings.InStr(TMP, ToS) - 1);
functionReturnValue = TMP;
return functionReturnValue;
}