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

Variant in VB6 to a VB.NET

P: n/a
Hi,

I have an COM object used in my VB.NET project. There's one function return
the result in Variant type so I have to convert it to object type.

Dim myValue as object

myValue = MyCOMobjectFunction

If I want to get value out of the myValue, I have to do this: myResult =
MyValue(0)

How can I convert it to dataset or something in VB.NET type?

Please help. Thanks

Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi John,

You may try CType or DirectCast.
Or if the Option Strict is set to Off , then i think you can just use =

Thank You,
rawCoder

"John" <Jo**@hotmail.com> wrote in message
news:Oc**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have an COM object used in my VB.NET project. There's one function return the result in Variant type so I have to convert it to object type.

Dim myValue as object

myValue = MyCOMobjectFunction

If I want to get value out of the myValue, I have to do this: myResult =
MyValue(0)

How can I convert it to dataset or something in VB.NET type?

Please help. Thanks

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.