By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

problem System.Single[*] -> System.Single[]

P: n/a
class object (COM-object) return dimension "System.Single[*]".
problem:

Object o; // object = VARIANT
o = comclass.GetData();
Single[] dm = (Single[]) o; // Error, problem convertation

Help!!!
Jul 3 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Keeper,

What is the type of o when you look at it in the debugger? Is it
"System.Single[*]" or does it say something else? I've never seen
"System.Single[*]" before...

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Keeper" <se***********@mail.ruwrote in message
news:OG**************@TK2MSFTNGP06.phx.gbl...
class object (COM-object) return dimension "System.Single[*]".
problem:

Object o; // object = VARIANT
o = comclass.GetData();
Single[] dm = (Single[]) o; // Error, problem convertation

Help!!!

Jul 3 '07 #2

P: n/a
type in the debugger = "System.Single[*]"
What is the type of o when you look at it in the debugger? Is it
"System.Single[*]" or does it say something else? I've never seen
"System.Single[*]" before...

--
>Object o; // object = VARIANT
o = comclass.GetData();
Single[] dm = (Single[]) o; // Error, problem convertation

Help!!!


Jul 3 '07 #3

P: n/a
>class object (COM-object) return dimension "System.Single[*]".

That probably indicates that the array has a non-zero lower bound,
which makes in incompatible with a regular Single[]. You can still
access each element with System.Array.GetValue().
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 3 '07 #4

P: n/a
Nicholas Paldino [.NET/C# MVP] wrote:
What is the type of o when you look at it in the debugger? Is it
"System.Single[*]" or does it say something else? I've never seen
"System.Single[*]" before...
[*] is a COM thingy.

Arne
Jul 4 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.