mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-07 23:43:57 +02:00
style: autoformat
This commit is contained in:
@@ -6,9 +6,10 @@ title: Basic information about .NET and C#
|
|||||||
---
|
---
|
||||||
|
|
||||||
## What is C#?
|
## What is C#?
|
||||||
|
|
||||||
It's a modern, object-oriented, component-oriented, type-safe language with the support of functional programming techniques.
|
It's a modern, object-oriented, component-oriented, type-safe language with the support of functional programming techniques.
|
||||||
|
|
||||||
It's multi-paradigm: *structured, imperative, object-oriented, event-driven, task-driven, functional, generic, reflective, concurrent*
|
It's multi-paradigm: _structured, imperative, object-oriented, event-driven, task-driven, functional, generic, reflective, concurrent_
|
||||||
|
|
||||||
C# has many features to develop robust and durable applications.
|
C# has many features to develop robust and durable applications.
|
||||||
|
|
||||||
@@ -33,9 +34,10 @@ C# has many features to develop robust and durable applications.
|
|||||||
- C# provides iterators that enable implementers of collection classes to define custom behaviors for client code.
|
- C# provides iterators that enable implementers of collection classes to define custom behaviors for client code.
|
||||||
|
|
||||||
## .NET architecture
|
## .NET architecture
|
||||||
|
|
||||||
C# programs run on .NET, a virtual execution system called the common language runtime (`CLR`).
|
C# programs run on .NET, a virtual execution system called the common language runtime (`CLR`).
|
||||||
|
|
||||||
The `CLR` is implementation by Microsoft of the common language infrastructure (`CLI`), an international standard. The CLI is the basis for creating execution and development environments in which languages and libraries work together seamlessly.
|
The `CLR` is implementation by Microsoft of the common language infrastructure (`CLI`), an international standard. The CLI is the basis for creating execution and development environments in which languages and libraries work together seamlessly.
|
||||||
|
|
||||||
Source code written in C# is compiled into an `intermediate language (IL)` which is `byte code` that conforms to the `CLI` specification.
|
Source code written in C# is compiled into an `intermediate language (IL)` which is `byte code` that conforms to the `CLI` specification.
|
||||||
The `IL` code and resources such as bitmaps and string, are stored in an assembly, typically with an extension of `.dll`. An assembly contains a manifest that provides information about the assembly's types, version, and culture.
|
The `IL` code and resources such as bitmaps and string, are stored in an assembly, typically with an extension of `.dll`. An assembly contains a manifest that provides information about the assembly's types, version, and culture.
|
||||||
@@ -54,7 +56,9 @@ The types can reference each other as if they were written in the same language.
|
|||||||
In addition to the run time services, .NET also includes extensive libraries like `Base Class Library` (`BCL`). These libraries support many different workloads. They're organized into namespaces that provide a wide variety of useful functionality. The libraries include everything from file input and output to string manipulation to XML parsing, to web application frameworks to Windows Forms controls. The typical C# app uses the .NET class library extensively to handle common "plumbing" chores.
|
In addition to the run time services, .NET also includes extensive libraries like `Base Class Library` (`BCL`). These libraries support many different workloads. They're organized into namespaces that provide a wide variety of useful functionality. The libraries include everything from file input and output to string manipulation to XML parsing, to web application frameworks to Windows Forms controls. The typical C# app uses the .NET class library extensively to handle common "plumbing" chores.
|
||||||
|
|
||||||
> Fully defined **Hello World** program
|
> Fully defined **Hello World** program
|
||||||
|
|
||||||
## Hello World
|
## Hello World
|
||||||
|
|
||||||
```cs
|
```cs
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
@@ -74,10 +78,7 @@ The `Hello` class has a single member, the method `Main`. `Main` method is decla
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
> New minimalistic approach (since .NET 6)
|
> New minimalistic approach (since .NET 6)
|
||||||
|
|
||||||
```cs
|
```cs
|
||||||
Console.WriteLine("Hello World");
|
Console.WriteLine("Hello World");
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user