Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

C# Tutorial

C# Tutorial (C sharp)

C# pronounced as C sharp is an ingenious object-oriented programming language that enables programmers to build lexically scoped, disciplined typing, imperative, declarative, robust and secure applications that run on .NET Framework.

It was primarily developed by Anders Hejlsberg in 2000 at Microsoft as a competitor to java which is quite similar.

Applications of C#

C# is used to create-

  • Windows applications
  • Mobile applications
  • Database applications
  • Client-server applications
  • Web services
  • Game development in unity
  • etc.

What is the .NET framework?

.NET Framework is a software development platform developed by Microsoft which consists of a large class library named ‘Framework Class Library’ (FCL)  and ‘Common Language Runtime’ (CLR).

‘Framework Class Library’ is the collection of some classes, interfaces, data types, etc which provide system functionality in .NET Framework such as input-output console applications, network features, etc.

Common Language Runtime is the base of the .NET Framework. Its main function is to manage core services like memory management, code accuracy and some other aspects such as managing programming code at execution time.

Hello World program in C#

// C# program to print Hello World!

using System;
namespace HelloWorld       // namespace declaration

   // Class declaration 
    class Maketoss { 

           // Main Method 
          static void Main(String[] args) { 

           // printing Hello World! 
           Console.WriteLine("Hello World!"); 

          // To prevents the screen from running and closing rapidly

How to run C# programs?

You can run C# programs on cmd (command prompt) as well as at some IDE (Integrated development kit) such as –

  • Microsoft Visual Studio
  • Rider
  • MonoDevelop
  • SharpDevelop
  • LINQPad
  • FlashDevelop
  • etc

My suggestion will be to use any IDE to run C# programs because of ease.

You have to download and install any IDE mentioned above. Here soon will be the video tutorial which will explain “How to download and install C# IDE.”

C# Program List

  • Hello World program in C#
  • How to take user input in C#
  • C# program to check even-odd number
  • C# program to calculate factorial of a number

Leave a Comment