tags:

views:

57

answers:

2

Does a .cs(C#) file compile under a .vbproj(VB.NET project) ? (VS 2005, .NET 2)

Say I have Animals.vbproj (namespace Animals)

I have Wolf.vb, Tiger.vb, Cat.vb, and a Human.cs

Could I use Animals.Human from a external AnimalsForm.vb form? Why?

+2  A: 

No, it has to be in a seperate assembly. Just make a reference to the C# assembly and instantiate the C# class as you would any other class.

Daniel Dyson
+2  A: 

No, language selection is PER PROJECT, with every project resulting in a separate assembly.

You COULD use ANimal.Human from an external form is referencing both assemblies, as the namespace has actually NOTHING to do with the project (you are free to use whatever namespace you feel like in any assembly), so the same namespace can be in multiple assemblies.

TomTom