StringReader sr = new StringReader(script);
string line = string.Empty;
while (line != null)
{
line = sr.ReadLine().Trim();
if (line.StartsWith("var"))
{
string type = line.Split(' ')[1];
Type t = Type.GetType(type);
vars.Add(new Variable<t>(default(t), ""));
}
}
编译此代码时,我收到标题中提到的错误。