2014.8.14 language basics

Source: Internet
Author: User

I. Static and Dynamic

Ii. Development History of. net

C # Programming

(1) Project Structure

. Cs -- source file, program code

. Config -- configuration file

. Csproj -- project file (used to manage file items)

. Sln -- solution file (used to manage projects)

 

Main Function

Static void main (string [] ARGs)

{

 

}

Function four elements: name, input, output, and processing

Note shortcut: Ctrl + E, C cancel Note: Ctrl + e, u modify a single error: Alt + right arrow

 

(2) Basic Data Types

1. Integer type (byte, short, Int, long)

2. Float (float, double, decimal)

3. Char)

4. Logical type (Boolean) (bool)

5. String string type

6. datetime of the date type

Variable

Variable name naming rules: 1. it can only consist of letters, numbers, underscores, Chinese characters, or @; 2. it can only start with a letter, underscore, Chinese character, or @; 3. it cannot be the same as the system keyword. (If the keyword is used as the variable name, add @ before it @)

Constant: a symbolic constant; a literal constant. Definition of a symbolic constant: Add const to it. A constant can only be a value, but cannot be a value.

Const bool B = true; the value of B after const is added cannot be changed, that is, a constant.

Escape Character: '\ B' // return

'\ T' // Tab key

'\' // Backslash

'\ ''// Single quotes

'\ "' // Double quotation marks

'\ N' // line feed

'\ R' // enter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.