//This is a Hello World! program in C#
namespace Helloworldprogram
{
class Hello {
static void Main(string[] args)
{
System.Console.WriteLine("Hello World!");
}
}
}
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)
}
}
// class
class Hello {
//main method
static void Main(string[] args)
{
Console.WriteLine("Hello World!"); // print 'Hello World!'
} // end of method
}// end of class
//good luck :)
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
}
}
}
// 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!
using System; // Java doesn't use this, but c# does
public class main
{
public static void Main(String[] args)
{
Console.WriteLine ("Hello World"); // Java = 'System.out.println("Hello World);");'
}
}