Maybe it's because I'm just learning this stuff, but what exactly are you trying to accomplish?
If we're always going to have a value of type double, why not just cast the object to double, have an array, and add it to that array? Will this array have other values later on?
Like I said, I'm kind of new at C#. But, it seems like there might be a better way. Will x ever be brought in as an array itself, or will it always be a single object?
alc6379
Cookie... That's it
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
A cast is what you're doing when you do this code:
object x =null;
double[] myarray = (double []) x;
basically, the (double []) part convertsx from type object to type double. I assume that it's passing the contents of x, as a double, into myarray?
Can the DLL you wrote support Generics? If so, maybe you could create a generic collection (you can have a collection that contains different types of objects), and pass that to the DLL.
alc6379
Cookie... That's it
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147