Display A simple hello message in .net using C#
Here I explain how to display a simple hello message using c# and here I am using two methods for displaying the hello word.1)Console.Write("Hello"):->In this case cursor blinking in the same line
2)Console.WriteLine("Welcome to .Net"):->In this case cursor blinking in the next line.
Example:
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.Write("Hello");//cursor blinking in the same line
Console.WriteLine("Welcome to .Net");//In this case cursor blinking in the next line
}
}
}
Output:
No comments:
Post a Comment