[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
VisualCSharpHelloWorldConsole
Add one line to change it to the following code:
Run the program with 'Debug | Start without debugging' (or CTRL-F5).
You can also run it with 'Debug | Start debugging', but then the window with text will immediately disappear after putting 'Hello World' on the screen.
To solve this, add one more line, making the code like this:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
VisualCSharpHelloWorldConsole
(C#) Hello World in Visual C#, ?Console Application
- 'File | Close Solution'
- 'File | New Project | Console Application'
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
}
}
}
Add one line to change it to the following code:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("Hello world");
}
}
}
Run the program with 'Debug | Start without debugging' (or CTRL-F5).
You can also run it with 'Debug | Start debugging', but then the window with text will immediately disappear after putting 'Hello World' on the screen.
To solve this, add one more line, making the code like this:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("Hello world");
System.Console.ReadKey();
}
}
}
- C
- C++
- C++ Builder, console
- C++ Builder, VCL
- C++ Builder, CLX
- C++ BuilderX, console
- C++ BuilderX, Win32 API
- C#
- PHP
- Prolog
- Turbo C++
- Visual Prolog
- Visual C# Console Application
- Visual C# Windows Application
- Visual C# Windows Application WPF
- ?Visual C# XAML Browser Application
- Win32 API
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
