3 thoughts on “What is C#”

  1. C#(Reading "C Sharp", Chinese transliteration "Sharp") is an object -oriented and operating by Microsoft. The high -level programming language above Net Framework is set to appear on the Microsoft Vocational Developer Forum (PDC). C#is the latest achievement of Microsoft researcher Anders Hejlsberg. C#looks amazingly similar to Java; it includes the process of single inheritance, interface, almost the same syntax as Java, and compile into the intermediate code and then run. But C#and Java are obviously different. It borrows a characteristic of Delphi. It is directly integrated with COM (component object model), and it is Microsoft. The protagonist of the Net Windows network framework.

    In this article, I will examine the general motivation to create a new computer language, and specifically indicate what causes the emergence of C#. Then I will introduce the similarities between C#and it to Java, C, C . Secondly, I will discuss some of the high -level and differential differences between the high -level and foundation between Java and C#. I will end this article by measuring the knowledge required for developing large applications in multiple languages ​​(or the lack of this knowledge), which is exactly. A major strategy of Net and C#. Currently, C#and. Net can only be obtained in the form of C#language rules, a "D preview version" of Windows 2000, and the form of rapidly increasing document sets on MSDN (not the final finalization).

    The definition of Microsoft C#is mainly inherited from C and C , and many elements in the language also reflect this. C#is wider than Java (such as Structs) from the designer inherited from the C inheritance, and it also adds its own new features (for example, the source code version definition). But it is too immature and cannot squeeze Java. C#also needs to evolve into a language that developers can accept and adopt. Microsoft is currently worthy of attention for this new language. At present, everyone's reaction is: "This is a counterattack against Java."

    C#is more like Java, although Microsoft remains silent on this issue. This is also expected. I think that because Java has recently been successful, companies using Java have reported that they have improved in production efficiency than C .

    The huge impacts brought by Java and everyone's extensive acceptance of it has clearly explained the number of programmers who work on this language and platform (it is estimated that there are two hundred and fifty -five in the world, 100,000 programmers use Java). The number of applications written by this language is surprising and has penetrated each level of computing, including wireless computing and mobile phone (such as the Java phone invented by Japan). Can C#be able to get such a courtesy in the user field? We must wait and see, as if the CEO and Chairman Kalpathi S, which have been by SSI company. As Suresh pointed out, "I found that all these are gradual. If C#does not exist, we can always return to Java or C and C . These are not entirely new technology; they are just big in a greater sense. The company's market gimmick. We must give them the time to settle down to see if these really have any impact on the IT industry. "

    The characteristics of inheritance from Java

    Class: The statement in C#is similar to Java. This is reasonable because the experience tells us that the Java model works well. Java's keyword Import has been replaced with USING, which plays the same role. The starting point where a class starts to execute is the static method main (). The Hello World program below shows the basic form:

    using system;

    class hello
    n {
    n static void main ()

    {

    console. Writeline ("Hello, World");

    }
    }

    In this example, the name System points to a basic C#practical Namespace of class collection. This naming space includes the Console class, which is used to output a string in this example. Class can be abstract and inherited: a class that is declared as abstract cannot be instantiated; it can only be used as a base class. C#keyword Sealed is like the Java keyword Final. It indicates that one class is not abstract, but it cannot be used as a base class of another class. Interface: Just like in Java, a interface is an abstract definition of a set of methods. When a class or structure implements a interface, it must implement all the methods defined in this interface. A single class can achieve several interfaces. Maybe there will be some subtle differences in the future, but this feature seems to have not changed from Java. Boer operation: The result of conditional expression is Boolean data type. Boolean data type is an independent data type in this language. There are no direct conversion processes from the Boolean type to other types. Boolean constant True and False are keywords in C#. Error treatment: Like Java, the process of processing the error processing by throwing and capturing abnormal objects. Memory management: from the bottom. Net framework for automatic memory waste recycling.

    C#The characteristics of inheritance from C and C

    The compilation: The program is directly compiled into a standard binary execution form. However, the source program of C#is not compiled into binary executable forms, but a medium language, similar to Java bytecode. If the ahead of the Hello World program is saved as a text file and named Hello. CS, it will be compiled into name hello. Exe executable program.

    The structure: The structure of a C#is similar to the C structure because it can contain data declaration and method. However, it is not like C , the C#structure is different from the class and does not support inheritance. However, the same as Java is that a structure can realize the interface.

    Pre -compiled compilation: There are pre -compiled instructions to support conditional compilation, warning, error reporting and compiling control control. The pre -compiled instructions available are:

    #define

    #undef

    #IF
    n #elif r

    #else

    #endif

    #warning

    #error
    n #line [] n #line []

    It without #include pseudo instructions. You can no longer use the #define statement to assign the symbol, so there is no concept of source code replacement-these symbols can only be used in #IF and #elif pseudo instructions. The numbers (and optional names) in the #line pseudo -instruction can modify the file name of the line number of #Warning and #ERROR output.

    Is operating symbols: some operators can be reloaded, while others cannot. In particular, no assignment operator can be reloaded. The monocular operator that can be overloaded is:

    -! ~ - true false

    r n
    - * / %

  2. Pay content for time limit to check for freenAnswer hello,/ many technology, you can refer to the best website C#the most fascinating place is the difference between it and Java, not similar. This section (most of the part of this series of the second part) tells C#implemented a place that is different from Java or Java does not have the characteristics at all. The middle code Microsoft has left a lot of room when the user chooses when the MSIL should be compiled into a machine code. Instead, it has been compiled into a machine code. It also understands many-if it is not most-programmer thinks that Java programs are inevitable than nothing written by C. This implementation method determines that based on Msil's program (referring to C#, Visual Basic, "Managed C "-C a version of CLS-Writing programs such as CLS) will exceed "interpretable" java code. It is necessary to get facts proved, because C#and other compilers generated MSIL have not yet released. , "Statement and other statements are only business skills. Java's middle code and MSIL are both in the middle of the assembly form. They are compiled into machine code at runtime or other time. At the time, you created one or more categories in a named space. In this name space (outside the class), you may also declare interfaces, enumerate types and structures. You must use the USING keyword to quote other others to quote other other. The content of the naming space. Basic data type C#has a wider data type than C, C or Java. These types are BOOL, BYTE, UBYTE, SHORT, USHORT, Int, UING, Ulong, Float, DOUBLE, and Decimal Like Java, all these types have a fixed size. Like C and C , each data type has two types: symbols and non -symbols. Like Java, a character variable contains one with a character variable that contains a character variable. 16 -bit Unicode character .c#new data type is DECIMAL data type. For currency data, it can store 28 -bit 10 -in -made numbers. Two basic categories of one class name Object are all other types of base classes. One and one The class named String is also part of this language like Object. As part of the language, it means that the compiler may use it-no matter when you write a string with quotation marks in the program, the compiler will create it will create A string object to save it. The parameter transmission method can be accepted by declarationnQuestions and what are the benefits and skills of developmentnWhat is SQL Server's skillsnAnswer the SQL Server database saying that the direct point is to complete the data storage, processing and security management of the data. Why use a database? Imagine if you design an OA system, the information of various employees and the business information are intricate. If they are stored in text files, how complicated the program is operated, even if the algorithm is algorithily Past people dizzy. You just need to tell what to do with the SQL Server database. If you don't need to think about it, the algorithm problem allows the database to do it by itself.nMore 2nBleak

Leave a Comment

Shopping Cart