C# (C Sharp)
Definition - What does C# (C Sharp) mean?
C# is a general object-oriented programming (OOP) language for networking and Web development. C# is specified as a common language infrastructure (CLI) language.
In January 1999, Dutch software engineer Anders Hejlsberg formed a team to develop C# as a complement to Microsoft’s NET framework. Initially, C# was developed as C-Like Object Oriented Language (Cool). The actual name was changed to avert potential trademark issues. In January 2000, NET was released as C#. Its NET framework promotes multiple Web technologies.
The term is sometimes spelled as C Sharp or C-Sharp.
What is Console Application?
A console application is an application that runs in a console window same as a C and C++ program.
It doesn’t have any graphical user interface. Console Applications will have character based interface.
It doesn’t have any graphical user interface. Console Applications will have character based interface.
Program : 1 "Add 2 Numbers"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SimpleProject
{
public class Add2Num
{
public static void Main(string[] args)
{
Console.WriteLine("Enter the 1st Number:\t");
int no1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the 2nd Number:\t");
int no2 = Convert.ToInt32(Console.ReadLine());
int tot=no1+no2;
Console.WriteLine("Total:="+tot);
Console.ReadKey();
}
}
}
Output
Note
To write C# console program ,Open Visual Studio -> File -> New Project -> Visual C# -> select Console Applications
No comments:
Post a Comment