Program structure in C #

The key concept of the structure of the organization, including C # program, namespaces, types, members, and assemblies . C # program consists of one or more source files. Program declared type, and type contains members, and is organized into namespaces. Examples include the type of classes and interfaces. Examples include members of fields, methods, properties, and events. C # program compiled will actually packaged into the assembly. File extension assembly generally .exe or .dll, depending on the implementation of that application or library;

 

The assembly comprising an intermediate language (IL) instructions in the form of executable code and symbol information in the form of metadata. Before executing the program, the IL code is compiled automatically converted into a dedicated processor code for real-time (JIT) .NET common language runtime.

Since the self-assembly is described comprising a function unit of code and metadata, since without the use of #include directives and header files in C #. Just refer to a specific assembly when compiling the program, you can use public types and members of this assembly included in a C # program.

Using C #, a plurality of source files can be stored in files in the source program. When you compile multiple files C #, can be processed together all the source files, and source files can freely reference each other. Conceptually, like all source files are centralized into one large file before processing the same. In C #, you never need to use forward declarations, because the declaration order does not matter (except for a few exceptions). C # does not limit the source file type can only be a kind of public statement, nor does it require the source file name must declare which type of want to match.

Guess you like

Origin blog.csdn.net/qq_41956142/article/details/94733784