What is C# programming language?
A simple, modern, general-purpose, object-oriented programming language. C sharp is a type-safe object-oriented language (unlike C++) this means that once some data has been assigned to a type it can not subsequently transform itself into another unrelated type.
- Ranked among most popular and most loved languages
- Build for mobile, web, cloud, desktop, gaming, and IoT
- Simple async patterns
- Language integrated queries
- Automatic memory management
- Familiar syntax for Java & C-style developers
- .NET supports multiple programming languages
C# enables developers to build a variety of secure and robust applications that run on the .NET Framework. You can use C# to create Windows client applications, XML Web services, distributed components, client-server applications, database applications etc. Visual C# provides an advanced code editor, convenient user interface designers, integrated debugger, and many other tools to make it easier to develop applications based on the C# language and the .NET Framework.
Datatype in C#
C sharp is a strongly typed programming language therefore every variable and object must have a declared type.
C# syntax is highly expressive, yet it is also simple and easy to learn. The curly-brace syntax of C# will be instantly recognizable to anyone familiar with C, C++ or Java. C# syntax simplifies many of the complexities of C++ and provides powerful features such as nullable value types, enumerations, delegates, lambda expressions and direct memory access, which are not found in Java. C# supports generic methods and types, which provide increased type safety and performance, and iterators, which enable implementer of collection classes to define custom iteration behaviors that are simple to use by client code.
.NET Framework Platform Architecture
C# programs run on the .NET Framework, an integral component of Windows that includes a virtual execution system called the common language runtime (CLR) and a unified set of class libraries.
Source code written in C# is compiled into an intermediate language (IL) that conforms to the CLI specification. After that C# program is executed, the assembly is loaded into the CLR, which might take various actions based on the information in the manifest. Then, if the security requirements are met, the CLR performs just in time (JIT) compilation to convert the IL code to native machine instructions. The CLR also provides other services related to automatic garbage collection, exception handling, and resource management. Code that is executed by the CLR is sometimes referred to as “managed code,” in contrast to “unmanaged code” which is compiled into native machine language that targets a specific system.
The following diagram illustrates the compile-time and run-time relationships of C# source code files, the .NET Framework class libraries, assemblies, and the CLR.
In addition to the run time services, the .NET Framework also includes an extensive library of over 4000 classes organized into namespaces that provide a wide variety of useful functionality for everything from file input and output to string manipulation to XML parsing, to Windows Forms controls.
Like this post? Don’t forget to share it! 🙂