Yesterday, I looked at the "C # Advanced Programming" in the object and type chapter, found that there are many omissions do not understand the place to re-understand
First of all, what is the object, my personal feeling is: in the programming world, a program is the processing logic of a thing, and the object is the abstract concept of this logic.
For example: We want to write a program to achieve "a person to drink water", according to my custom, here can be divided into two objects
1, "Person" object: This person can be Zhang San, John Doe, can even be an animal
2, "Water" object: This water is also a conceptualization of things, ice water, whitewater, wine, drinks are OK
A class is an object, a class can have data members and function members, and data members include: Fields, constants, and members of events
For the "People" Object above, field: height, weight, gender, age ...
Constant: Limbs (this should be a constant, I really can't find what can be used as a constant in the person)
Function members include: Methods and properties
A method is something that an object can handle: People can drink water, people can wear clothes ...
A property should be a special function, a function specifically designed to take values and assign values to a field.
Re-learning "C # Advanced Programming" (Objects and types)