//This is a Hello World! program in C#namespaceHelloworldprogram{classHello{staticvoidMain(string[] args){
System.Console.WriteLine("Hello World!");}}}
usingSystem;classProgram{staticvoidMain(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)}}
// C# program to print Hello World!usingSystem;// namespace declarationnamespaceHelloWorldApp{// Class declarationclassVansh{// Main MethodstaticvoidMain(string[] args){// statement// printing Hello World!
Console.WriteLine("Hello World!");// To prevents the screen from// running and closing quickly
Console.ReadKey();}}}
// classclassHello{//main methodstaticvoidMain(string[] args){
Console.WriteLine("Hello World!");// print 'Hello World!'}// end of method}// end of class//good luck :)
usingSystem;namespaceProject{publicclassProgram{publicstaticvoidMain(string[] args){
Console.Write("Hello world!");// Write means write on that line
Console.WriteLine("hello");// WriteLine means write and end that line}}}
// Hello World! programnamespaceHelloWorld{classHello{staticvoidMain(string[] args){
System.Console.WriteLine("Hello World!");}}}
'When you run the program, the output will be: Hello World!