PC Review


Reply
 
 
Guest
Posts: n/a
 
      17th Dec 2003
what is the equivalent of a variant in .net?

Thanks in advance


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      17th Dec 2003
Object


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> what is the equivalent of a variant in .net?
>
> Thanks in advance
>
>



 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      17th Dec 2003
The equivalent in .NET is the Object data type (object in C#).

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> what is the equivalent of a variant in .net?
>
> Thanks in advance
>
>



 
Reply With Quote
 
Guest
Posts: n/a
 
      17th Dec 2003
My vb function in com+ is:

public Function updatestatus(byval MessageControlIDas string ,byval Status
as string,byref ErrMessage as variant, optional byval QueueErrorMessage as
string ="")as variant

I am trying to call this through com interop:

object ReturnedValue;

ReturnedValue = HVOUTInstance.UpdateStatusByMCID(MessageControlID,
Status,ErrMessage, QueueErrorMessage);

I get an error saying " cannot convert from 'object' to ref object'

what should I do?

thanks

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> what is the equivalent of a variant in .net?
>
> Thanks in advance
>
>



 
Reply With Quote
 
John Timney \(Microsoft MVP\)
Guest
Posts: n/a
 
      17th Dec 2003
Object is the closest thing to it, since every thing in .NET - including
primitive data types - is an object, a variable of object type can point to
any data type.

You should however get used to using strongly defined types like string, int
etc and use object sparingly, for good practice if nothing else. Hard to
bebug a huge list of objects.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> what is the equivalent of a variant in .net?
>
> Thanks in advance
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using created variant value to reference to a variant within my code TD Microsoft Excel Programming 1 22nd Apr 2009 11:53 AM
BackDoor.Agent Variant =?Utf-8?B?dGhlZ2FyZG5lcnM0Mg==?= Windows XP Help 1 29th Oct 2004 08:36 PM
Virus variant =?Utf-8?B?Z3JlZW5tYW4=?= Windows XP Security 1 11th Mar 2004 04:41 AM
new blaster variant? pete Windows XP Security 3 15th Oct 2003 05:56 PM
Having issues with 3rd party products deleting MSBlaster.exe variant A? ProtoStrike Windows XP Security 2 19th Aug 2003 07:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:00 PM.