Home All Groups Group Topic Archive Search About

Help using multiple languages

Author
7 Jun 2006 10:06 PM
Zeke Zinzul
Hi,

I am writing a simple graphics program to generate a Yin Yang logo. I need
to implement a flood fill routine and am trying to write a stack class in
C#. My main program is in VB.

My solution is called "Yin-Yang", containing the two projects.

My C# project is called coordstack with a class file in it called stack.cs.
This file contains a namespace called "coordstack" and a class, also called
"coordstack". This is a class library.

My VB program is called "Yin-Yang", same as the solution. This is a windows
application.

How do I go about declaring a variable in my main VB program (a subroutine
in form1) of type "coordstack" which is in the C# project?

I want to say: Dim s as coordstack

I get an error: "type coordstack is not defined".

When I try an "imports coordstack" I get an error, "namespace or type
coordstack for the imports "coordstack" cannot be found.

Can someone show me the way?

I am using Visual Studio .Net, the one before 2005.

Thanks, Zeke

Author
8 Jun 2006 12:37 AM
iwdu15
compile your C# class into a .dll, then in your vb project, in the solution
explorer, add a reference to the C# dll you just compiled. at the top of your
code in VB, add the imports statement.
--
-iwdu15
Author
8 Jun 2006 1:07 AM
GhostInAK
Hello iwdu15,

It'll Probably be Imports Yin_Yang

Show quoteHide quote
> compile your C# class into a .dll, then in your vb project, in the
> solution explorer, add a reference to the C# dll you just compiled. at
> the top of your code in VB, add the imports statement.
>
Author
8 Jun 2006 1:18 AM
iwdu15
how do you figure? the main program in Yin_Yang, which he is the importing
the C# file into the VB file. His C# class is named "stack" which means the
imports statement will be "Imports Stack"
--
-iwdu15
Author
8 Jun 2006 10:15 PM
GhostInAK
Hello iwdu15,

Because you dont import classes.. you import namespaces.

-Boo

Show quoteHide quote
> how do you figure? the main program in Yin_Yang, which he is the
> importing the C# file into the VB file. His C# class is named "stack"
> which means the imports statement will be "Imports Stack"
>
Author
8 Jun 2006 5:17 AM
Cor Ligthert [MVP]
Zeke,

In addition to iwdu15

You can as well add the C# project to your current project.
Be sure that it is a DLL library project or change that in the properties.
Go to Project -> Add reference choose for project; than you see that in the
box
Select that and you are ready again.

I hope this helps,

Cor

Show quoteHide quote
"Zeke Zinzul" <z***@shambolica.demon.co.uk> schreef in bericht
news:e67ikg$jfg$1$8300dec7@news.demon.co.uk...
> Hi,
>
> I am writing a simple graphics program to generate a Yin Yang logo. I need
> to implement a flood fill routine and am trying to write a stack class in
> C#. My main program is in VB.
>
> My solution is called "Yin-Yang", containing the two projects.
>
> My C# project is called coordstack with a class file in it called
> stack.cs. This file contains a namespace called "coordstack" and a class,
> also called "coordstack". This is a class library.
>
> My VB program is called "Yin-Yang", same as the solution. This is a
> windows application.
>
> How do I go about declaring a variable in my main VB program (a subroutine
> in form1) of type "coordstack" which is in the C# project?
>
> I want to say: Dim s as coordstack
>
> I get an error: "type coordstack is not defined".
>
> When I try an "imports coordstack" I get an error, "namespace or type
> coordstack for the imports "coordstack" cannot be found.
>
> Can someone show me the way?
>
> I am using Visual Studio .Net, the one before 2005.
>
> Thanks, Zeke
>