最简单的程序 - 而且不起作用! [英] Simplest program ever - and does not work!

查看:54
本文介绍了最简单的程序 - 而且不起作用!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


刚刚下载了.NET SDK,为了测试它的工作原理,我/ b $ b写了这个Hello world。代码:


明确选项


进口系统


''AHello World! " Visual Basic中的程序。


模块Hello

Sub Main()

Microsoft.VisualBasic.Interaction.MsgBox(" Hello ,世界!")

结束子

结束模块


编译好并且有效。现在我更换了MsgBox

句子只需


MsgBox(La vamos a liar)


并且编译器不喜欢它。它告诉我''Name

未声明MsgBox''。所以进口声明不是很好吗?
工作吗?


鉴于这种症状,可能是什么问题?


问候

解决方案

2003-11-23,Angel Salamanca< an ************ ***@telefonica.net>写道:

大家好,

刚刚下载了.NET SDK,为了测试它的工作原理,我写了这个Hello world。代码:

选项明确

进口系统

''AHello World! Visual Basic中的程序。

模块你好
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox(Hello,world!)
End Sub
结束模块

它编译好并且有效。现在我用MsgBox(La vamos a liar)取代MsgBox
句子,编译器不喜欢它。它告诉我''Name
MsgBox未被声明''。那么进口声明是不是很有效?

鉴于这种症状,可能是什么问题?

问候



添加:


进口Microsoft.VisualBasic


-

Tom Shelton
MVP [Visual Basic]


2003-11-23,Angel Salamanca< an ************* **@telefonica.net>写道:

大家好,

刚刚下载了.NET SDK,为了测试它的工作原理,我写了这个Hello world。代码:

选项明确

进口系统

''AHello World! Visual Basic中的程序。

模块你好
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox(Hello,world!)
End Sub
结束模块

它编译好并且有效。现在我用MsgBox(La vamos a liar)取代MsgBox
句子,编译器不喜欢它。它告诉我''Name
MsgBox未被声明''。那么进口声明是不是很有效?

鉴于这种症状,可能是什么问题?

问候



添加:


进口Microsoft.VisualBasic


-

Tom Shelton
MVP [Visual Basic]


类型

进口Microsoft.visualbasic.interaction

$ b在您的计划顶部$ b。

" Angel Salamanca" <一个*************** @ telefonica.net>在留言中写道

news:05 **************************** @ phx.gbl ... < Helloquote class =post_quotes>大家好,

刚刚下载了.NET SDK,为了测试它的工作原理,我写了这个Hello world。代码:

选项明确

进口系统

''AHello World! Visual Basic中的程序。

模块你好
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox(Hello,world!)
End Sub
结束模块

它编译好并且有效。现在我用MsgBox(La vamos a liar)取代MsgBox
句子,编译器不喜欢它。它告诉我''Name
MsgBox未被声明''。那么进口声明是不是有效?

鉴于这种症状,可能是什么问题?

关注



Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

'' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me ''Name
MsgBox is not declared''. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards

解决方案

On 2003-11-23, Angel Salamanca <an***************@telefonica.net> wrote:

Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

'' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me ''Name
MsgBox is not declared''. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards



Add:

Imports Microsoft.VisualBasic

--
Tom Shelton
MVP [Visual Basic]


On 2003-11-23, Angel Salamanca <an***************@telefonica.net> wrote:

Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

'' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me ''Name
MsgBox is not declared''. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards



Add:

Imports Microsoft.VisualBasic

--
Tom Shelton
MVP [Visual Basic]


Type
Imports Microsoft.visualbasic.interaction

at the top of ur program.
"Angel Salamanca" <an***************@telefonica.net> wrote in message
news:05****************************@phx.gbl...

Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

'' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me ''Name
MsgBox is not declared''. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards



这篇关于最简单的程序 - 而且不起作用!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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