S
Steph
Hello,
I'm using COM object in an application. One method used give an object wich
type is object.
When I use a GetType on its, I have "System.String[*]".
I try to convert it to loop on the array of string but I have an exception
(Invalid Cast Exception)
Here is my code :
myFormule = new Formule(); //Formule is a COM object
object myTest = myFormule.GetElement;
txtInfo.AppendText("object type: " + myTest.GetType()); //<-- here I have a
System.String[*]
//convert
string[] myTbl = (string[])myTest; // <-- here I have an exception
....
What can I do to loop and get values from myTest ?
thanks for your help
Steph
I'm using COM object in an application. One method used give an object wich
type is object.
When I use a GetType on its, I have "System.String[*]".
I try to convert it to loop on the array of string but I have an exception
(Invalid Cast Exception)
Here is my code :
myFormule = new Formule(); //Formule is a COM object
object myTest = myFormule.GetElement;
txtInfo.AppendText("object type: " + myTest.GetType()); //<-- here I have a
System.String[*]
//convert
string[] myTbl = (string[])myTest; // <-- here I have an exception
....
What can I do to loop and get values from myTest ?
thanks for your help
Steph