C # is an object-oriented, high-level programming language that runs on the. NET Framework.
Its advantages are simple, type-safe, the garbage collector automatically reclaims memory, encapsulates a number of common classes, suitable for rapid development.
Its disadvantage lies in the reliance on the. NET Framework, limited cross-platform support, and the inability to understand specific internal details that are not suitable for projects with high performance requirements.
Introduction to the. NET Box
. The NET Framework is a multilingual component development and execution environment that provides a unified programming environment across languages.
Mainly divided into these five parts
Common language Runtime (CLR)
NET Framework Application Management engine, up to compile to run and interact with the operating system, all by the CLR.
Base Class Library (BCL)
A set of underlying class libraries that contain common class libraries used in the development process. such as MFC class Library, Java class Library, VB Class Library, input/output, string and data classes and so on.
Ado.net&xml
Instead of ADO, a new data framework satisfies three important requirements that ADO cannot meet : A disconnected data access model is provided.
This is critical to the Web environment ; Provides close integration with XML ; It also provides seamless integration with the. NET framework .
ASP. NET Web Forms Web Service
Templates for Web-based network applications with ASP.
Windows Forms
Templates for Windows window-based applications
Managed code:
Running applications that require the. NET Framework Support
The source code compiles the intermediate code, and the runtime needs to interpret the intermediate code with the JIT compiler to explain the cost machine code before interacting with the system.
Some common classes of the. NET base Class library are easy to use in your code.
Objects that are instantiated during a program run are stored in the managed heap, and the memory is automatically reclaimed by the garbage collector when it is no longer in use.
Unmanaged code:
Running applications that do not require the. NET Framework Support
The native code is compiled to directly interact with the system.
Objects that are instantiated during a program run are stored in the heap, and when they are no longer in use, they need to write code for memory recycling, which can cause memory garbage to continue to increase.
Introduction to C #