编译和执行VB.Net程序

编译和执行VB.Net程序:
如果您使用Visual Studio.Net IDE,请执行以下步骤:

启动Visual Studio。 Start Visual Studio.

在菜单栏,选择文件,新建,项目。 On the menu bar, choose File, New, Project.

从模板中选择Visual Basic。Choose Visual Basic from templates

选择控制台应用程序。Choose Console Application.

使用浏览按钮指定项目的名称和位置,然后选择确定按钮。 Specify a name and location for your project using the Browse button, and then choose the OK button.

新项目显示在解决方案资源管理器中。 The new project appears in Solution Explorer.

在代码编辑器中编写代码。 Write code in the Code Editor.

单击运行按钮或F5键运行项目。 将出现一个包含行Hello World的命令提示符窗口。 Click the Run button or the F5 key to run the project. A Command Prompt window appears that contains the line Hello World.

您可以使用命令行而不是Visual Studio IDE编译VB.Net程序:

打开文本编辑器,并添加上述代码。 Open a text editor and add the above mentioned code.

将文件另存为helloworld.vb。 Save the file as helloworld.vb

打开命令提示符工具并转到保存文件的目录。 Open the command prompt tool and go to the directory where you saved the file.

类型VBC helloworld.vb,然后按回车编译代码。 Type vbc helloworld.vb and press enter to compile your code.

如果在你的代码中没有错误命令提示符下会带你到下一行,并会产生HelloWorld.exe的可执行文件。 If there are no errors in your code the command prompt will take you to the next line and would generate helloworld.exe executable file.

接下来,输入的HelloWorld来执行你的程序。 Next, type helloworld to execute your program.

您将可以看到“Hello World”字样vb.net教程在屏幕上。 You will be able to see "Hello World" printed on the screen.

 
————————————————
版权声明:本文为CSDN博主「pre_eminent」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/pre_eminent/article/details/81490985

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值