可以使用vb和c#进行开发 [英] can develop using vb and c#

查看:123
本文介绍了可以使用vb和c#进行开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想知道是否可以使用Visual Studio Express 2010使用Visual Basic .net和c#.net来构建Web项目?

例如:如果我基于vb创建新的解决方案,是否可以使用c#在代码后面添加新页面?

或者,我可以在c#中创建一个类,而在vb中创建另一个类吗?

某种混合吗?

有任何线索吗?

非常感谢.

Hi,

I would like to know if, using visual studio express 2010, I can build a web project using both visual basic .net and c# .net?

Eg: if I create new solution based on vb, can I add new page with code behind using c#?

Or, can I create one class in c# and other class in vb?

Some kind of mix?

any clue ?

thanx a lot.

推荐答案

也许您可以开发..,

我在vb中开发了一个Web控件(不是DLL),我的所有页面都在c#中.

我在2008年尝试过.
May Be you can Develop..,

I develop a Web control(not DLL) in vb where my all pages in c#.

i tried in vs 2008.


是的,您可以使用两种不同的语言开发不同的Web表单(页面).同一页面不能使用两种不同的语言.

C#的页面指令将为
Yes, you can develop different web forms (pages) in two different languages. Same page can''t have two different languages.

The page directive for c# will be
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>


和VB.Net将是


and VB.Net will be

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>



我已经在2008年速成版中尝试过此操作,而不是在2010年中尝试过



I have tried this in 2008 express editions, not in 2010


您可以将C#和VB.NET创建为网页项目时结合起来创建.如果您要进行解决方案项目,则不能使用交叉互操作性.
You can create C# and VB.NET combined when you are creating it as webpage project. if you are going for solution project you cant use cross interoperability.


这篇关于可以使用vb和c#进行开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆