开发者

Using C# and VB.NET in one solution

I'm busy on a small project to convert an Access2003 db to .NET. I am trying to integrate my funct开发者_JS百科ionality in an existing project that is being used for Administration of some kind. The code in this project is VB.net.

I started by setting up my Data Access Layer, which seems to work fine. I can make new web pages that access the data I need. However when I start to use class files to set up my Business Logic Layer I can't build my project when using C# instead of VB. I dislike VB and like to program in C# as I know the syntax a lot better, etc. Is it possible to program using C# knowing that VB.NET was the language chosen to build the entire project on?

If not, what will be the smartest way to integrate my module into the project using my favorite programming language? (Make a project and reference to the dll?)

Edit: So the next step in my question would be -->

If I set up a new project within the existing solution, can I make that new project contain my Business Logic Layer + Data Access Layer and reference from my existing one?


Yes, you can't mix languages within the same project, but you can add as many projects written in different languages as you like, to the same solution. (This is sometimes very useful, especially when it comes to having portions written in C++/CLI, which are able to do things which would be impossible to do in C#/VB.NET.)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜