All Posts

C#

Introduction to c#

C# is pronounced "C-Sharp". It is an object-oriented programming language created by Microsoft that runs on the .NET Framework. C# has roots from the C family, and the language is close to other popular languages like C++ and Java.

Last updated : Oct 01, 2021

Co-authored by : Nilmani

NO IMAGE AVAILABLE
Share (Copy this link):

Introduction to C#

C# is a general-purpose, modern and object-oriented programming language pronounced as "C sharp". It was developed by Microsoft Corporation. As of 2021 current version of C# is version 9.0. C# has lot of similarities to C and also Java syntactically, and it is easy for the users who have knowledge of C, C++ or Java.

Key-Terms before learning c#

What is IL, MSIL, CIL and JIT?

IL(Intermediate Language) is also known as MSIL(Microsoft Intermediate Language) or Common Intermediate Language(CIL). All .Net source is compiled to IL. This is then converted to machine code at the point where the software is installed, or at runtime by Just In Time (JIT) compiler.

What is CLR?

CLR(Common Language Runtime) is the heart of the .Net Framework. All language has runtime and the responsibility of the runtime to take care of code execution of the program. For example: VC++ has MSCRT40.dll, VB6 has MSVBVM60.dll, Java has Java Virtual Machine, etc.

Similarly, .Net has CLR. And the responsibilities of CLR are:

    • Garbage Collection
    • Code Access Security
    • Code Verification
    • IL

What is CTS?

In order that two language communicate smoothly CLR has CTS (Common Type System). Example: In VB we have "Integer", and in C++/C# we have "int" data type. These data type are not compatible so the interface between them is very complicated. In order to able that two different language can communicate Microsoft introduce Common Type System. So, "integer data type in VB6 & "int" data type in C++ will converted to system.int32 which is data type of CTS.

What is CLS?

CLS (Common Language Specification) is a subset of CTS which all .NET language are expected to support. Microsoft has defined CLS which are nothing but guidelines that the language follow, so that it can communicate with other .NET language in a seamless manner.

Feature of IL

    • Object orientation and use of interfaces.
    • Strong distinction between value and reference type.
    • Strong data typing.
    • Error handling using exceptions.
    • Use of attributes.

.Net, .Net Framework and .Net Core

.Net:

.NET is a developer platform made up of tools, programming languages, and libraries for building many different types of applications. There are various implementations of .NET. Each implementation allows .NET code to execute in different places—Linux, macOS, Windows, iOS, Android, and many more.

.Net Framework:

.NET Framework is the original implementation of .NET. It supports running websites, services, desktop apps, and more on Windows.

.Net Core:

.NET Core is a cross-platform implementation for running websites, services, and console apps on Windows, Linux, and macOS. .NET Core is open source on GitHub.

Why to learn C#?

Popularity of c# is rising, and here why we want to learn c#

  1. C# is a high-level language and it will be easy to learn for anyone.
  2. It is also the most popular programming language in the world.
  3. It is widely used for developing Desktop and Web Application.
  4. Huge community support.
  5. C# is also the best Game Development language in Unity.

Some of the Application area of C#

  • Mobile applications and Desktop applications
  • Web applications and Web services
  • Web sites
  • Games and VR
  • Database applications

Advantages of C#:

  • C# is very efficient in managing the system. All the garbage is automatically collected in C#.
  • There is no problem of memory leak in C# because of its high memory backup.
  • Cost of maintenance is less and is safer to run as compared to other languages.
  • C# code is compiled to a intermediate language (Common (.NET) Intermediate Language) which is a standard language, independently irrespective of the target operating system and architecture.

Disadvantages of C#:

  • C# is less flexible as it depends a lot on .NET framework.
  • C# runs slowly and program needs to be compiled each time when any changes are made.
  • It cannot do low level stuff like interfacing directly with hardware through drivers and firmware.

You may also want to read

More post by Nilmani

NO IMAGE AVAILABLE
Laravel

How to force redirect HTTP to HTTPS in Laravel 9.x, 8.x, 7.x and 6.x

in this article you will learn to force Laravel project to use HTTPS for all links such as routes if you are facing an issue of not secure a URL, then don't worry about this, the best solution of How to force redirect HTTP to HTTPS in Laravel 8.x, 7.x and 6.x is shown in this article.

Nilmani
2 years ago
NO IMAGE AVAILABLE
C#

Download and Install visual studio and preparing our IDE on windows 11

Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop computer programs, as well as websites, web apps, web services and mobile apps, Games, etc.

Nilmani
2 years ago
NO IMAGE AVAILABLE
C#

Introduction to c#

C# is pronounced "C-Sharp". It is an object-oriented programming language created by Microsoft that runs on the .NET Framework. C# has roots from the C family, and the language is close to other popular languages like C++ and Java.

Nilmani
2 years ago
NO IMAGE AVAILABLE
Alpine Js

What is x-data in alpine and how to use

x-data defines a chunk of HTML as an Alpine component and provides the reactive data for that component to reference.

Nilmani
2 years ago
NO IMAGE AVAILABLE
Alpine Js

Installing and using Alpine on your website

Alpine.js is a refreshingly minimal JavaScript framework that gives you the reactive nature of Vue and React but with much more simplicity. In this article, we will learn to install alpine.js on our website.

Nilmani
2 years ago
0 Comments

Some HTML is ok.

Don't forget the topic.

No comments yet