I am reading the values from plc tags
public void synch_read() //reads device
{
Array values;
Array errors;
object qualities = new object(); //opc server will store the quality of the item
object timestamps = new object(); //store the timestamp of the read
//read directly from device
oGroup.SyncRead((short)OPCAutomation.OPCDataSource.OPCDevice, 2, ref handles, out values, out errors, out qualities, out timestamps);
String abcd = (Int16[])qualities.ToString();
}
In this line
String abcd = ((Int16[])qualities).ToString();
I am getting the error
unable to cast object of type 'system.int16[*]' to type 'system.Int16[]'
How can I solve this error?
EDIT
I tried
Int16[] abcd = (Int16[2])qualities;
error ; expected