473,915 Members | 5,813 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hello World without using VS.NET

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
Jul 21 '05 #1
24 2459
Step 1: Write the code

public class Hell

public static void Main(

System.Console. WriteLine("Hell o, World.")

Step 2: Save and compile

(On command line) csc.exe HelloWorld.c

Step 3: Run it

HelloWorld.ex

Hello, World
Jul 21 '05 #2
Step 1: Write the code

public class Hell

public static void Main(

System.Console. WriteLine("Hell o, World.")

Step 2: Save and compile

(On command line) csc.exe HelloWorld.c

Step 3: Run it

HelloWorld.ex

Hello, World
Jul 21 '05 #3
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 HelloWorldInCSh arp
{
class HelloWorldApp
{
static void Main(string[] args)
{
Console.WriteLi ne("Hello World from C#!");
Console.ReadLin e();
}
}
}

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******** ***********@twi ster.southeast. rr.com...
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

Jul 21 '05 #4
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 HelloWorldInCSh arp
{
class HelloWorldApp
{
static void Main(string[] args)
{
Console.WriteLi ne("Hello World from C#!");
Console.ReadLin e();
}
}
}

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******** ***********@twi ster.southeast. rr.com...
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

Jul 21 '05 #5
Wow. Thanks. By chance would you have this same simple app in VB.NET?

Sincerely,

Andy Sutorius
Jul 21 '05 #6
Wow. Thanks. By chance would you have this same simple app in VB.NET?

Sincerely,

Andy Sutorius
Jul 21 '05 #7
Tom Dacon <To**@t-dacons.com> wrote:
If you have the .NET SDK installed, you have all the compilers and linkers
and assemblies you need.
You don't even need the SDK installed - the .NET framework itself comes
with the C# and VB.NET compilers.
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.


Just including the framework directory (eg
C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322) on the path is enough.

I use csc all the time - it's much quicker to type in code in a quick
text editor and compile it using csc than it is to wait for VS.NET to
start up, find or create an appropriate solution/project, and then put
the code in, when it comes to quick programs for newsgroup posts, for
instance.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #8
Tom Dacon <To**@t-dacons.com> wrote:
If you have the .NET SDK installed, you have all the compilers and linkers
and assemblies you need.
You don't even need the SDK installed - the .NET framework itself comes
with the C# and VB.NET compilers.
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.


Just including the framework directory (eg
C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322) on the path is enough.

I use csc all the time - it's much quicker to type in code in a quick
text editor and compile it using csc than it is to wait for VS.NET to
start up, find or create an appropriate solution/project, and then put
the code in, when it comes to quick programs for newsgroup posts, for
instance.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #9
Andy Sutorius <an**@sutorius. com> wrote:
Wow. Thanks. By chance would you have this same simple app in VB.NET?


Option Strict On

Imports System

Class Test
Shared Sub Main()
Console.WriteLi ne ("Hello, world")
End Sub
End Class

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
463
by: Andy Sutorius | last post by:
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
0
10039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9881
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11354
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7256
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5943
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4778
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.