C # Main features of the language,
1. C # is a simple, modern, object-oriented language inherited from C ++ and Java.
2. It aims to combine the high-yield Visual Basic and the high-efficiency underlying C ++ features.
3. It is part of Microsoft Visual Studio7.0.
4. Visual studio supports Vb, VC ++, C ++, Vbscript, and Jscript. All these languages provide access to the Microsft. NET platform.
5.. NET includes a Common Execution engine and a rich class library.
6. Microsofts JVM eqiv is the Common language Runtime Library (CLR ).
7. CLR supports more than one language, such as C #, VB. NET, Jscript, ASP. NET, and C ++.
8. Source Code ---> intermediate language code (IL) ---> (JIT compiler) machine code.
9. Classes and data types are common to all. NET languages.
10. We can use C # To develop console applications, Windows applications, and Web applications.
11. In C #, Microsoft handles C ++ problems, such as memory management and pointers.
12. It supports garbage collection (useless memory collection), automatic memory management, and many other features.
C # Main Features
A. Simple
The pointer in 1. C # has disappeared.
2. Unsafe operations. For example, Direct Memory operations are not allowed.
3. The ":" or "->" Operator in C # is useless.
4. Because it is based on the. NET platform, it inherits the features of Automatic Memory Management and garbage collection.
5. The variable data range of the original data type is Integer or Floats.
6. integer values 0 and 1 are no longer used as boolean values. the boolean values in C # are pure true and false values, and no more "=" and "=" operators are incorrect. "=" is used for comparison and "=" is used for value assignment.
B. Modern
1. C # built on the current trend, it is very powerful and simple for creating compatible, scalable, and robust applications.
2. C # has built-in support to convert any component into a web service. Any application running on any platform can use this service over the Internet.
C. Object-oriented
1. C # supports data encapsulation, inheritance, polymorphism, and object interface (that is, the interface keyword in java ).
2. (int, float, double) is not an object in java, but C # introduces and struct to convert the original data type to the object int I = 1; string a = I Tostring (); // convert (OR) Boxing
D. type security
1. in C #, we cannot perform insecure type conversion like converting double to boolean.
2. The value type (constant type) is initialized to zero and the reference type (the object and class are automatically initialized to zero by the compiler.
3. array type subscript starts from scratch and cross-border check.
4. type overflow will be checked.
E. mutual compatibility
1. C # provides original support for COM and windows-based applications.
2. restrict the use of the original pointer.
3. You no longer need to explicitly implement unkown and Other COM interfaces. These functions have been built in.
4. C # allow users to operate on old code using pointers as unsafe code segments.
5. Components in VB. NET and other intermediate code languages can be directly used in C.
F. scalability and scalability
1 .. NET introduces the concept of parts, which have self-described functions through its "Manual. the manual establishes the identity, version, language, and digital signature of parts. parts do not need to be registered anywhere.
2. To expand our programs, we only need to delete old files and upgrade them with new files. Dynamic Link Library does not need to be registered.
3. upgrading software components is only a task of error detection. code modifications can affect existing programs. C # supports version modifications in languages. the support for interface and method overloading enables complex program frameworks to evolve over time.
Conclusion
C # is a modern, secure, and object-oriented programming language that enables programmers to quickly and easily develop solutions for the Microsoft. NET platform.