2017-11-13 4 views
0

Wonderware Archestra IDE.NET 인 스크립팅을 사용하고 있습니다. 이 잘 작동 :StringReader에서 문자열을 인수로 사용하십시오.

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

답변

1

당신은 Wonderware의 문자열 유형 인 문자열 유형을 선언했습니다. 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);