Professional Documents
Culture Documents
namespace ConsoleApplication32
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("Hello World!");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication32
{
class Program
{
static void Main(string[] args)
{
System.Console.Write("Hello World!");
}
}
}
Two methods for writing the code, which are used extensively
i. Console. Write() – Writes the specified value to the console
window
Ex: Console. Write(“Hello World);
namespace ConsoleApplication32
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("Hello World!");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication32
{
class Program
{
static void Main(string[] args)
{
System.Console.Write("Hello World!");
}
}
}