"C # entry and improvement"

zhaozj2021-02-08  261

"C # entry and improvement"

Foreword

C # introduces that we know that C and C have become a wide range of applications in the development of commercial software. However, the flexibility of C and C sacrifices the development efficiency. If compared to other development languages ​​(such as VB, Delphi), the same function C / C software usually requires a longer development cycle, to write more code. It is because of the complexity of C / C development and requires a longer development cycle, many C / C developers are looking for a development language that improves more balance between functionality and development efficiency. So Microsoft thought of C # (pronounced C Sharp) and launched C #. In June 2000, Microsoft released the C # language and .NET platform. The C # language is a strong type, object-oriented language, which has simple syntax, strong expression; and .NET platform is the cornerstone of Microsoft's ".NET program". The core of the .NET platform includes two aspects that is a famous general language runtime. Although this noun is awkward, everyone can compare it and Java virtual machines, the task completed by both The same, on the other hand is a large heap universal library, which can be called in multiple languages ​​and generate a common intermediate language (Intermediate language), which can also take Java bytecode. The ratio, although the completion of the way is somewhat different. C # is an advanced, object-oriented language that allows developers to quickly build a wide range of MS network platform applications, and provide a large number of development tools and services to help developers to develop various applications based on calculation and communication. . It is because C # is an object-oriented development language, so C # can be widely used for the development of high-level commercial applications and underlying systems. Even through a simple C # configuration, it can be easily transformed into a web-based application through the Internet, and can be called by Internet by Internet. It has the following characteristics:

Development Efficiency and Safety Currently Web Application Software Development Presses a challenge to traditional commercial application software, developers have organized to develop a variety of applications with shorter development cycles, and need to provide better Correzenity rather than establishing a software system that can use long. The design of C # is a full consideration of these factors. C # helps developers complete the same function through fewer code, and better avoid errors. Combining new development modes with web development means better utilizing existing Web standards, such as HTML, XML, SOAP (simple object access protocol). The existing development tool is before the Internet or before the application is not fully applied, so it does not adapt to the development needs of the current Web technology. C # Developers can easily extend their own applications on the M-network platform. C # can convert any components into a web service, and any application calls for any platform that can be running on the Internet. It is important that C # provides built-in support for this feature. More importantly, the Web service framework allows any Web services to look similar to the C # built-in object, so you can continue to use the object-oriented development methods and techniques they already have during development. In addition, C # also has many other features to make themselves the most excellent Internet development tool. For example, XML is currently a standard for data structures transmitted in the network, in order to improve efficiency C # will allow the XML data map to be mapped directly into a structure. This kind of data can be effectively processed. Reduce the development in the development Even excellent C / C developers are difficult to avoid some common errors in the encoding process, such as erroneous initialization a variable, and this error will cause a variety of unpredictable errors, and It is difficult to find. If the error is put into the production environment before discovering, exclude these errors will pay an expensive price. The advanced design idea of ​​C # can eliminate many common mistakes in C / C development, such as: garbage collection mechanism will alleviate developers' burden on memory. The variable in the C # will automatically be initialized according to the environment. Variables are types safe. Using C # will make developers more easily develop and maintain a variety of business applications. Providing built-in version support to reduce the development cost update software system (module) will be an easy way to generate errors, which may have an impact on existing software during code modification. In order to help developers handle these issues, C # has built-in version control functions in the language. For example: Function overload must be explicitly declared (this situation often occurs during C and Java), which prevents code-level errors and retains versionized features. Another related feature is support for interfaces and interface inheritance. These features ensure complex software that can be conveniently developed and upgraded. Summary, these features can help develop more strong software succession and reduce development costs. Strong function, easy performance, flexible combination of process and software implementation in commercial applications In order to better realize the company's various business plans, there must be close contact between business processes and software implementations in software systems. But most of the development languages ​​cannot easily link various application logic to the code. For example, developers use various annotations to indicate that the abstract business objects representative of various classes. C # Allows the use of predefined data or expanded metadata on any object. Regional properties can be used in the system structure (translator: similar to NT network domain structure), and these attributes are added to class, interfaces, or other elements. Developers can independently test properties on various elements. This will make some similar work in the area where the object attributes like the collection area, or the automatic tool is written, and the interface is simply defined.

Scalable collaborative capabilities Although management is strong, transparent, type security development environment is suitable for most commercial applications, but realistic experience tells us that some combination of efficiency or with existing application interface APIs The reason is required to be encoded using the original development method. Also, many C / C developers prefer to give up using some development tools that can improve development efficiency. C # solves these problems by the following method: Built-in supports the COM model and the Windows platform API. Allows the limit of use pointers. Any objects in C # automatically become COM objects, developers no longer need explicit implementation IUnknown and other COM interfaces, can also be convenient and naturally using existing COM objects, without having to care if these COM objects use C # Development. For developers using C #, C # allows developers to call OS provided by the API. Use a pointer in the labeled code area and manually manually manually manually manage the memory allocation. This allows C / C developers to familiarize and turn to C # and do not need to abandon the development habits formed in previous development, and the previous C / C code can still be reused. Whether it is support for COM or support for API calls to provide adequate development control capabilities for developers. Both C # and Java compiles to the platform, cross-language code, and the code can only run automatically reclaimed waste memory in one controlled environment, and eliminate pointers (can use pointers in C #, but must be indicated Unsafe keywords do not need header files, all code is restricted within a range, and because there is no header, eliminating the class-defined loop dependent all classes are derived from the object. Out, and you must use the New Keyword to assign the memory-locking mode to support multithreading. The concept inherited by the interface (Interface), which does not inherit a global function or constant, Everything must belong to the class  array or string comes with the length calculation and boundary check  only "." Operator, no "->" and "::" null "," boolean "and" bool "become Keyword  Any variable is initialized before use, can't use an integer to return to the IF condition statement, you must use the Boolean "try" module to have "Finally", C # is an advanced, object-oriented The development language and can easily and easily create a variety of applications and build web services that can be called inter-network. From the perspective of development language, C # can help developers to avoid errors, improve work efficiency, and have a powerful function of C / C .

转载请注明原文地址:https://www.9cbs.com/read-2705.html

New Post(0)