One moment - I smell a mistake here :-)

(a) you have a class in C# that is having a parameter (class or struct)
defined in a VB assembly.
(b) you say that VB (!) complains about not having a reference to the
project containing the parameter's class?

For the error - where exactly does C# come into play, as just being a
user of the function. The error, obviously according to your saying in
(b), is already there in VB.

Now, this sounds more like a VB problem for you where C# is totally out,
or?

Or can it bwe that you build a "circular reference" between projects?

Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

-----Original Message-----
From: Michael Lehman [mailto:[EMAIL PROTECTED]] 
Sent: Montag, 13. Mai 2002 15:04
To: [EMAIL PROTECTED]
Subject: [DOTNET] C#/VB Interop Problems

Dear .Net Friends...

I'm working on a project that combines both VB and C#.

I ran into a problem this weekend trying to create an
class in C# which had a method who's type was built in VB.

Previously this has worked as advertised.  However, this time
the C# compiles fine but when I try to call that method
VB *ALWAYS* complains that I don't have a reference
to the project containing the parameter's class.

Now, I know I do have that because I can say
   Dim foo as XXX

and assign a variable I know is of type XXX to it.

However, the VB compiler will not accept "foo" as
a valid parameter to that C# method.

I have tried declaring "foo" with a fully qualified
namespace name for the type XXX (e.g.  aa.bb.cc.dd.XXX)
but that makes no difference either.

Just for confirmation, I rebuilt the class
in VB instead of C# and had no problems.

Thanks,

Michael Lehman
Cereus Design Corp.
http://www.cereus7.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to