|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help using multiple languagesI 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 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 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. > 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 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" > 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 >
Function versus ReadOnly Property
VB.NET Threading CPU Issue le nom 'vb6' n'est pas déclaré Overload resolution failed All I'm looking for is a simple answer to a simple question DataGrid Control How do I use a class, when the class requires functions in the main form? Object-to-Relational Tool Memory Manipulation Unmanaged C++ Void* |
|||||||||||||||||||||||