xxxxxxxxxx
// Enjoy your journey in C#
print "Hello World"
xxxxxxxxxx
// Hello World! program
namespace HelloWorld
{
class Hello {
static void Main(string[] args)
{
System.Console.WriteLine("Hello World!");
}
}
}
xxxxxxxxxx
//This is a Hello World! program in C#
namespace Helloworldprogram
{
class Hello {
static void Main(string[] args)
{
System.Console.WriteLine("Hello World!");
}
}
}
xxxxxxxxxx
using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
//note: you can replace {Hello World} with any thing you want to print on the screen
//also you can add {Console.ReadKey(true);} if you dont want the program to close immediately (this command is basicly waiting for a key press from the user)
}
}
xxxxxxxxxx
// Hello World! program
namespace HelloWorld
{
class Hello {
static void Main(string[] args)
{
System.Console.WriteLine("Hello World!");
}
}
}
'When you run the program, the output will be: Hello World!
xxxxxxxxxx
using System;
namespace Project
{
public class Program
{
public static void Main(string[] args)
{
Console.Write("Hello world!"); // Write means write on that line
Console.WriteLine("hello"); // WriteLine means write and end that line
}
}
}
xxxxxxxxxx
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}
}