Training the next day

Source: Internet
Author: User
Tags float double

Today the main learning of the C # Language Foundation, personally think the main points are: The main function of the output input statement, shortcut key application, annotation recognition, data type, basic type conversion and operators.

1 input and output statements for main functions

Content is filled in the static void Main (string [] args) {contents};

Console.Write (); Output statement

Console.WriteLine (); Output statement, wrap line

Console.ReadLine (); Input statement

2 Application of shortcut keys

Shift+delete Delete a row

Ctrl+x Cut

alt+→ Tips

3 Recognition of annotations

Use//indicate, put on the leftmost side of the row.

I think the comment has two points, one is the part that does not execute the comment when executing the program. The second is the role of interpretation.

4 Data types

String Type: String

Value types: Date type datetime, enum type enum, struct type struct.

Float type: float double dfcimal

Boolean: BOOL has only two values of true and False

Integer: byle short int long where int is used most.

5 Basic Type Conversions

The main talk is int a = Int.parse (string type), where int can be replaced by another type.

6 operator

A++//a=a+1 ++a//a=a+1

A--//a=a-1--a//a=a-1

Where the difference between the operation: b=a++ is b=a,a=a+1. First Use after add

B=++a means a=a+1,b=a. First add and then use

The remaining multiplication, greater than less than,&&, | |,! I've been in high school.

Conditional operator? : such as a>0: not to come,//if a>0, is to come. If not a>0 will not come.

Assignment op A + = 5;//a=a+5;
A-= 4;//a=a-4;
a *= 5;//a=a*5;
a/= 3;//A=A/3;
a%= 3;//a=a%3;

7 Escape characters

This is to avoid the use of command-type obfuscation, in other ways to represent the same meaning character.

Because the simple look of the escape character to see the obscure, when used to see the advantages.

Finish!!

Training the next day

Related Article

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.