0

我在.NETin 中使用脚本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);
4

1 回答 1

1

您已经声明了一个 String 类型,即 Wonderware String 类型。StringReader 需要一个 System.String(即 .NET 类型)。

将您的字符串声明更改为 System.String:

dim SR as System.IO.StringReader;
dim Input as System.String;
Input = "OPCClient_L09.Valve.AliasDatabase";
SR = new System.IO.StringReader(Input);
于 2017-12-13T16:25:46.227 回答