我在.NET
中使用Wonderware Archestra IDE
编写脚本。这很好用:
dim SR as System.IO.StringReader;
SR = new System.IO.StringReader(OPCClient_L09.Valve.AliasDatabase);
但我需要这样,但这不起作用:
dim SR as System.IO.StringReader;
dim Input as String;
Input = "OPCClient_L09.Valve.AliasDatabase";
SR = new System.IO.StringReader(Input);
答案 0 :(得分:1)
您已声明了String类型,即Wonderware String类型。 StringReader期待System.String(即.NET类型)。
将String声明更改为System.String:
dim SR as System.IO.StringReader;
dim Input as System.String;
Input = "OPCClient_L09.Valve.AliasDatabase";
SR = new System.IO.StringReader(Input);