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)