开发者

Does a .cs file compile under a .vbproj?

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

Say I have Ani开发者_运维百科mals.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?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜