SoFunction
Updated on 2025-03-07

Summary of the main features of C# language

# is a simple, modern, object-oriented language inherited from C++ and Java.
2. Its goal is to integrate the high yield of Visual Basic and the high efficiency of C++ underlying features.
3. It is part of Microsoft Visual Studio 7.0.
Studio supports Vb, VC++, C++, Vbscript, and Jscript. All these languages ​​provide access to the Microsoft .NET platform.
5..NET includes a Common Execution engine and a rich class library.
JVM equiv is the Common language runtime library (CLR).
Supports more than one language, such as C#, Jscript, 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, pointers, etc.
12. It supports garbage collection (useless memory collection), automatic memory management and many other features.

The main features of C#

A. Simple

The middle pointer has disappeared.
2. Unsafe operations, such as direct memory operations are not allowed.
The "::" or "->" operator in # is useless.
4. Because it is based on the .NET platform, it inherits the characteristics of automatic memory management and garbage collection.
5. Data ranges with variable primitive data types such as Integer, Floats, etc.
6. The shaping values ​​0 and 1 no longer appear as booleans. The boolean values ​​in C# are purely true and false values ​​and there are no more "="operators and "="operators errors."==" are used for comparison operations and "=" are used for assignment operations.

B. Modern

#Built on the current trend, it is very powerful and simple to create mutually compatible, scalable, robust applications.
#Have built-in support to convert any component into a web service, and any application running on any platform can use this service over the Internet.

C. Object-oriented

#Supports data encapsulation, inheritance, polymorphism and object interfaces (i.e. interface keywords in java).
2. (int, float, double) is not an object in java, but C# introduces and structures to make the original data type become an object int i=1;String a=i Tostring();//Convert (or) Boxing

D. Type safety

1. In C#, we cannot perform unsafe type conversion to convert double to boolean.
2. The value type (constant type) is initialized to a zero value and the reference type (objects and classes are automatically initialized to zero value by the compiler.
3. The array type subscript starts from zero and conducts out-of-bounds checks.
4. Type overflow will be checked.

E. Mutual compatibility

#Provide original support for COM and windows-based applications.
2. Allow restricted use of original pointers.
3. Users no longer need to explicitly implement unkown and other COM interfaces, these functions are already built-in.
#Allows users to manipulate old code using pointers as unsafe code segments.
Components in other intermediate code languages ​​can be used directly in C#.

F. Scalability and Scalability

1..NET introduced the concept of components, which have self-described functions through their "manuals". The manual establishes the identity, version, language and digital signature of components, etc. Components do not need to be registered anywhere.
2. To extend our program, we just need to delete old files and upgrade them with new files. There is no need to register a dynamic link library.
3. The process of upgrading software components is just a task of error detection. Modification of code can affect existing programs. C# supports version modification in the language. Support for interface and method overloading allows complex program frameworks to develop and evolve over time.

in conclusion

C# is a modern, type-safe, object-oriented programming language that enables programmers to quickly and easily develop solutions for Microsoft .NET platforms.