First Program in C# – Printing a Sentence

First Program in C# – Printing a Sentence

We use Visual Studio to create and run programs in C# Language.
Open Visual Studio and Create new Console Application in C #.

Console Applications Interface has “Only Texts”

Your First Program will look like this

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Escalera
{
class Program
{
static void Main(string[] args)
{

// “we will code here”
}
}
}

All C# console application should have a method (which is a function) named Main.

Program Execution Starts from Here .

Lets Print the sentence in our console application

static void Main(string[] args)
{

       Console.Writeline(“I am Learning C# From Escalera Technologies”);

// Writeline is a method, “( )” are used to pass data to the method, ” ; ” Semicolon represents end of line
}

This will print “I am Learning C# From Escalera Technologies” on console

 

Tag – first program c sharp printing sentence

Social Share

Leave a Reply

Your email address will not be published. Required fields are marked *