Chapter 2, "Hello World"

zhaozj2021-02-16  100

Chapter 2, "Hello World"

First, class, objects and types

1. Object-oriented programming is to create a new type (TYPE)

2, the type of C # is defined by class (Class), and one of the classes is called object

3, method

Property and behavior (Method).

Behavior is achieved through member methods.

The method is the function of the class, and the member is sometimes referred to as a member function.

Main is capitalized in C #, can return int or void type

Main is the entry point of the program, and each C # program must contain a main method.

4, annotation (Comment)

// C

/ * * / C

///

5, console csc.exe

6, name space, dot operator

7, Using

Behind using

Using Using Before you definition

Using can only be applied to Namespace, cannot be used for class

8, case sensitive

Variable Camel Nogan Method Samevariablename

Function, constant, nature PASCAL note method SOMEFUNCTION

9, Static

Second, develop "Hello World"

The locals window displays the value of all local variables.

转载请注明原文地址:https://www.9cbs.com/read-11243.html

New Post(0)