Hello World不使用VS.NET [英] Hello World without using VS.NET

查看:57
本文介绍了Hello World不使用VS.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人在不使用Visual

Studio.NET的情况下成功创建了Hello World程序?如果是这样,你使用了什么IDE以及你导入了哪些命名空间?


谢谢!


Andy Sutorius

解决方案

第1步:编写代码


公共类地狱


public static void Main(


System.Console.WriteLine(Hello,World。)


步骤2:保存并编译


(在命令行上)csc.exe HelloWorld.c


第3步:运行它

HelloWorld 。$

Hello,World


第1步:编写代码


公共课地狱


public static void Main(


System.Console.WriteLine(Hello,World。)


第2步:保存并编译


(在命令行上)csc.exe HelloWorld.c


第3步:运行它


HelloWorld.ex


Hello,World


如果你有他安装了.NET SDK,你有所有编译器和链接器

和你需要的程序集。您可以使用记事本或任何其他文本编辑器来创建和修改源代码,然后使用命令行编译器

来创建可执行文件。例如,键入

记事本中的以下代码并将其另存为Hello.cs。然后从命令窗口输入

csc Hello.cs

,你将得到Hello.exe。运行Hello.exe,您将在命令窗口中收到hello world

消息。


这是代码:


使用系统;


命名空间HelloWorldInCSharp

{

类HelloWorldApp

{

static void Main(string [] args)

{

Console.WriteLine(C#的Hello World!) );

Console.ReadLine();

}

}

}

命令行编译器和链接器可用于构建任何类型的
应用程序或库程序集。有许多命令开关。尝试使用csc /?

来了解可用的内容。


自VS.Net发布以来,我个人没有这样做过,所以我不记得你需要设置什么才能让这项工作变得如此轻松。

可能需要在执行环境中设置一些路径对于

命令窗口。查看SDK文档,看看需要做什么

通过环境变量。


如果你没有.NET SDK,你可以从微软网站上获得它

(不收费,据我所知)。


祝你好运,

汤姆Dacon

Dacon Software Consulting

" Andy Sutorius" <一个** @ sutorius.com>在消息中写道

新闻:oJ ******************* @ twister.southeast.rr.co m ...

有没有人成功创建过Hello World程序而不使用Visual
Studio.NET?如果是这样,你使用了什么IDE以及你用什么命名空间
导入?
谢谢!

Andy Sutorius



Has anyone successfully created a Hello World program without using Visual
Studio.NET? If so, what IDE did you use and what namespaces did you import?

Thanks!

Andy Sutorius

解决方案

Step 1: Write the code

public class Hell

public static void Main(

System.Console.WriteLine("Hello, World.")

Step 2: Save and compile

(On command line) csc.exe HelloWorld.c

Step 3: Run it

HelloWorld.ex

Hello, World


Step 1: Write the code

public class Hell

public static void Main(

System.Console.WriteLine("Hello, World.")

Step 2: Save and compile

(On command line) csc.exe HelloWorld.c

Step 3: Run it

HelloWorld.ex

Hello, World


If you have the .NET SDK installed, you have all the compilers and linkers
and assemblies you need. You can use Notepad or any other text editor to
create and modify the source code, and then use the command line compilers
to create the executables. For instance, key in the following code in
Notepad and save it as Hello.cs. Then from a command window, type
csc Hello.cs
and you''ll get Hello.exe. Run Hello.exe and you''ll get the hello world
message in a command window.

Here''s the code:

using System;

namespace HelloWorldInCSharp
{
class HelloWorldApp
{
static void Main(string[] args)
{
Console.WriteLine("Hello World from C#!");
Console.ReadLine();
}
}
}

The command line compilers and linkers can be used to build any kind of
application or library assembly. There are many command switches. Try csc /?
to get an idea of what''s available.

I haven''t personally done this since VS.Net was released, so I don''t
remember what you need to set up in order to make this work so easily.
Probably some paths need to be set up in the execution environment for the
command window. Look at the SDK documentation to see what needs to be done
by way of environment variables.

If you don''t have the .NET SDK, you can get it from the Microsoft site
(without charge, as I understand it).

Good luck,
Tom Dacon
Dacon Software Consulting
"Andy Sutorius" <an**@sutorius.com> wrote in message
news:oJ*******************@twister.southeast.rr.co m...

Has anyone successfully created a Hello World program without using Visual
Studio.NET? If so, what IDE did you use and what namespaces did you import?
Thanks!

Andy Sutorius



这篇关于Hello World不使用VS.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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