Basic introduction to C #

1. Object Oriented

2. The component-oriented

3. structured language

The frame part 4. .net

5. Cross-platform language

C # function

1. Boolean conditions

2. Automatic garbage collection

3. Standard Library

4. Component Version

5. Properties (Properties) and events (Events)

6. delegate (delegates) and Event Management (Event management)

7. easy to use generics

8. indexer (indexers)

9. Conditional compilation 

10. LINQ and Lambda expressions

11. Integrated window

.Net framework

Framework is an innovative platform to write applications that have

1 Windows applications

2 web application

3 web services

 

C # program structure

Namespaces

  1.  Using namespace System
  2. Statement of space 
    namespace NewNameSpace
    {
    }

     

class

  1. class declaration   
    namespace NewNameSpace
    {
        class NewClass
        {
        }
    }
    

class method

  1. Main method, all entrance of a C # program
    namespace NewNameSpace
    {
        class NewClass
        {
             static void Main(string[] args) //Main 方法需要为static void 类型
             {
             }
            
        }
    }
    

class property

Statements and expressions

Note

important point

  1. C # is case sensitive, case sensitive
  2. All statements and expressions must be used; end
  3. Program Execution Main method
  4. Unlike Java, the file name can be different from the class name

 

 

 

 

 

 

 

 

 

 

 

Published 25 original articles · won praise 5 · Views 3213

Guess you like

Origin blog.csdn.net/Ellis1993/article/details/105257663