C # beginner's knowledge about the code framework, annotation methods, common shortcut keys, and variable declaration methods,

Source: Internet
Author: User

C # beginner's knowledge about the code framework, annotation methods, common shortcut keys, and variable declaration methods,
Preface

After learning the VB language, I soon began to learn another language. Yes, this language is c #. He and VB have many things in common, first, let's take a look at c!

Overall content c #,. net, Java

C # is a programming language that can be used to develop applications based on the. net platform. To run the c # program on a computer, A. net Framework is required.

. Net generally refers to the. Net Framework, which is a platform and a technology.

Java is both a technology and a programming language.

. Net functions

1. You can develop desktop applications (Winform); 2. Internet applications (ASP. NET); 3. Mobile Development (wp7, wp8 ).

. Net interaction modes

1. C/S (client Clinet/Server mode Server)

2. B/S (Browser/Server mode Server)

Code framework

A namespace can have multiple classes. A class has only one primary function, but can have multiple functions.

Annotation Method

1. Single line comment: starts;

2. Multi-line comment: starts with/* and ends;

3. document annotation: Write the annotation in the class or method ///

Common shortcut keys

1. Ctrl + K + D: Code shuffling

2. Ctrl + K + C: code comment

3. Ctrl + K + S: External Code (Code folding)

Variable declaration method
Int number; number = 1000; // The first Int num1, num2, num3; num1 = 100; num2 = 200; num3 = 300; // The second Int number1 = 50; // The third type
Data Type

1. int (integer): int num = 100;

2. double (decimal): double douNumber = 30.5; Accuracy: 15-16 digits

3. char (character) caused by single quotation marks

4. the string is enclosed in double quotation marks.

5. decimal (decimal money): decimal money = 23; or decimal money = 23.67 m; precision: 28-29

Naming rules

1. It cannot start with a number. It can start with a letter, underscore, or @.

2. It can be followed by any number, letter, or underline.

3. cannot repeat with keywords

4. Case Sensitive

5. Repeated definitions are not allowed.

6. Do not use Chinese characters in the code

Summary

C # What I learned now is a simple language. What I need to do now is to gradually learn more about c #.

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.