Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hello world via notepad

Posted on 2002-07-23
5
Medium Priority
?
1,115 Views
Last Modified: 2010-05-19
i am completely new to C,C++,C#
before buying VS.NET i would like to download the SDK
and try out some simple C# programs using the Notepad editor
can anyone explain me how to use the SDK and notepad to write a 'hello world' program in C#
and how to get it running on win98/2000/XP
0
Comment
Question by:pierrecampe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 7172834
FYI: you can order a 60-day trial version of Visual Studio.NET from microsoft
0
 
LVL 4

Accepted Solution

by:
DarthPedro earned 400 total points
ID: 7172851
First, make sure that you have the .NET Framework SDK installed on your machine.  You can get it from: http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true.

First, launch notepad and enter the following code:
class MyApp {
   public static void Main() {
      System.Console.WriteLine("Hello, world! (from C#)");
   }
}

Then, save the file (I did it under c:\projects).

Next, launch a command prompt window and change directories into the one with your helloworld.cs file.  At the prompt, type in:
c:\Projects> C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\csc helloworld.cs

This will run the C# compiler.  When, it's done, you should be able to run your new app.  At the prompt, just type in:
c:\Projects> helloworld

That should run your console application with an output of:
Hello, world! (from C#)

Finally, to get it to run on another machine, you need to make sure that the .NET Framework redistributable is installed on that machine.  These are the libraries and components needed to run .NET applications.  You can get that from: http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/MSDN-FILES/027/001/829/msdncompositedoc.xml&frame=true.
0
 
LVL 6

Author Comment

by:pierrecampe
ID: 7175358
thank you
works O.K
but if i run it from the windows explorer the console window immediately closes,is there a way to prevent that ?
0
 
LVL 6

Author Comment

by:pierrecampe
ID: 7175362
>>FYI: you can order a 60-day trial version of Visual Studio.NET from microsoft
Where and how ?
0
 
LVL 4

Expert Comment

by:DarthPedro
ID: 7175693
run it in an open command prompt rather than through the explorer.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question