. NET Learning notes----2015-07-15 (C # Basics Review 01)

Source: Internet
Author: User

One months of study, the basic part is basically over, now began to strengthen the basic part of the review

1. Comments

Single line comment//Comment Line code

The contents of a multiline comment/* Comment */

Documentation comments///annotation classes and methods

html<!--The contents of the note--

2. Naming specification

1), Camel Camel naming specification: first letter lowercase first words, the remaining words capitalized, variables, fields

int age string Name char gender ... string hightschool

int _chinese (must be underlined in front of the field)

2), Pascal: Class and method naming, the first letter of each word is capitalized

Class Getmax

The name must make sense, let the person who see the code know, what does the naming mean?

The first part: Object-oriented review (Oo--object oriented)

Exercise 1: There are different files on the disk, such as: TXT file, avi video file, XLS spreadsheet.

Requires writing a console program, the user enters a file with a suffix name, and passes the file name to a method, which returns a corresponding file object based on the user's input suffix name.

Tip: Write different classes to emulate different types of files, create a unified parent class for different file classes, use simple Factory mode

. NET Learning notes----2015-07-15 (C # Basics Review 01)

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.