0
0
C Sharp (C#)programming~5 mins

What is C#

Choose your learning style9 modes available
Introduction

C# is a programming language used to create software and apps. It helps you tell the computer what to do in a clear way.

When you want to build Windows desktop applications.
When creating games using the Unity game engine.
When developing web applications with ASP.NET.
When writing software that runs on Microsoft platforms.
When you want a language that is easy to learn and powerful.
Syntax
C Sharp (C#)
C# is a language where you write instructions in files ending with .cs.

A simple program looks like this:

using System;

class Program {
    static void Main(string[] args) {
        Console.WriteLine("Hello, world!");
    }
}

C# code is organized in classes and methods.

The Main method is where the program starts running.

Examples
This prints a greeting message to the screen.
C Sharp (C#)
using System;

class Program {
    static void Main(string[] args) {
        Console.WriteLine("Hello, C#!");
    }
}
This shows how to store a number and print it using a message.
C Sharp (C#)
using System;

class Program {
    static void Main(string[] args) {
        int number = 5;
        Console.WriteLine($"Number is {number}");
    }
}
Sample Program

This program prints a welcome message when run.

C Sharp (C#)
using System;

class Program {
    static void Main(string[] args) {
        Console.WriteLine("Welcome to C# programming!");
    }
}
OutputSuccess
Important Notes

C# is made by Microsoft and works well on Windows.

You can also use C# on other systems with tools like .NET Core.

C# is good for beginners because it is easy to read and write.

Summary

C# is a simple and powerful programming language.

It is used to build many types of software, especially on Windows.

Programs start running from the Main method inside a class.