Why you don’t pass valid URL to new OpcCom.Da20.Server(url, server)?
Becase I do not what is a valid URL. Could be “http://localhost/Scada/”? I really do not know.
Interface is just a declaration. The runtime executes the method of an object that was actually created.
I am trying to create a class derived from IOPCSyncIO interface. Implementing Something like this:
“private IOPCSyncIO campo;
public IdentifiedResult[] Write(ItemValue[] items)
{
if (this.campo == null)
throw new NotConnectedException();
((IOPCSyncIO) this.campo).Write(items);
}”
without return, because IOPCSyncIO.write is void method
but give me a NullReferenceException
I am trying to create a instance of a interface, but that is not possible.