C # IsSimple,Modern,Object-orientedAndType SecurityOfProgramming Language.
C # is developed by C and C ++. C # (Chinese pronunciation: "c saap", English pronunciation: C sharp) is firmly rooted in the C and C ++ languages. It is specially used by Microsoft.. NET platform.
•Simple
C # One advantage that C ++ does not possess is that it is easy to learn. The primary goal of this language is simplicity. C # is easy to implement.
In C #, no pointers are popular in C ++. In C ++, there are:, and-> operators used for namespace, members, and references. For beginners, operators are still difficult to learn. C # discard other operators and only use a single operator ".".
•Modern
For enterprise-level programming languages, the new financial data type (decimal) is very popular. You use a new decimal data type, which is used for financial computing.
Full memory management is no longer your task. A garbage collector is provided during runtime, responsible for C #ProgramMemory Management.
•Object-oriented:
The core of C # Is Object-Oriented Programming. C # supports all key object-oriented concepts, such as encapsulation, inheritance, and polymorphism.
1. Encapsulation
Encapsulation is a program design mechanism, which is boundCodeAnd operation data, and make them not affected by external interference and misuse, so as to ensure security.
The basic unit of C # Is a class, which defines the form of an object and specifies the code for data and operations.
2. Polymorphism
It defines an interface and multiple methods.
3. Inheritance
It is a process in which an object obtains the attributes of another object.
•Type Security
C # implement the strictest type security, so you must follow the rules of some variables in C #: you cannot use variables that are not initialized.
C # helloworld
Using system;
// A "Hello world! "Program in C #
Namespace helloworld
{
Class hello
{
Static void main ()
{
System. Console. writeline ("Hello world! ");
}
}
}
The first 2nd lines of code, which is a single line comment statement in C. Similar to C ++, C # supports two annotation methods: single-line comments starting with "//" and multi-line comments paired with "/*" and "*/" cannot be nested between comments.