1. Index of ClassAn index is a set of get and set front accessors that support referencing an object as a method of consuming an array element. An index is usually a number of data members, and it always exists as a case member of a Lei class.
C + + review Note One (declaration definition of a class applied and constructor destructor section)Const in C is "a variable that cannot be changed", whereas in C + + The seed is "a constant of type description", constants must be initialized and
Transferred from: http://www.cnblogs.com/sujz/articles/2044365.htmlThe inheritance of derived classes is summarized as follows:
How to Inherit
Description
Public
The public and protected members of the base
Section 9-binding
In addition to restricted access, the access method also determines which method calls the quilt class or which attribute accesses the quilt class. the association between function calls and functions and the relationship between
[. Net you must know] (6): go deep into the keywords --- base and this
Author: anytao
This article introduces the following:
Basic object-oriented concepts
Basic keywords
This keyword is easy to understand.
1.
A base class usually defines any function that needs to be redefined as a virtual function. Virtual only appears in the member function declaration within the class, and cannot appear outside the class definition body. Virtual is used to start
This and base are classified as access keywords, which are used to implement access operations on the Inheritance Mechanism.
This is used to reference the current instance of the class, or to reference the inherited method.
Main functions of this:
•
Section Nineth-bindingIn addition to restricting access, the access mode also determines which method will be called by the quilt class or which property will be accessed by the quilt class. The Association of a function call to the function itself,
4.1 what are the inheritance methods? What is the inheritance of each derived class to the base class members?
Public inheritance, private inheritance, and protection inheritance.
Private Members of the base class cannot be accessed by any
Valid C # Principle 30: Select CLS-compatibleProgramSetItem 30: prefer CLS-compliant assemblies
The. NET runtime environment is language independent: developers can write components in different. NET languages. This is often the case in actual
In addition to restricted access, the access method also determines which method calls the quilt class or which attribute accesses the quilt class. the association between function calls and functions and the relationship between member access and
In fact, this is simply a saying: "A subclass that is not in the same package as the base class can only access protected members inherited from the base class, you cannot access the protected members of the base-class instance ".
Original works
Category 4
Design of the 4.1 category
Class is the basis of object-oriented design. A good class should have a single responsibility, clear interfaces, few but complete interfaces, low coupling between classes, and high internal class
And
C # base and this
-- From Rocky Ren
2. Basic Concepts
Base and this are attributed to access keywords in C #. As the name suggests, they are used to implement access operations of the Inheritance Mechanism to satisfy access to object members, this
When I read a book on C ++ over the past two days, I feel a little unfamiliar with an inherited knowledge point. Maybe I have never been in touch before, maybe I have never been in touch for too long, but I forget it now. It should be noted down to
In addition to restricted access, the access method also determines which method calls the quilt class or which attribute accesses the quilt class. the association between function calls and functions and the relationship between member access and
Section 9 -- in addition to restricting access, binding also determines which method calls the quilt class or which attribute accesses the quilt class. the association between function calls and functions and the relationship between member access
1. Public inheritanceWhen a class inherits from a public inheritance, the access properties of the base class's public and protected members are not changed in the derived class, and the private members of the base class are not directly accessible.
First: Private, public, access to the Protected Access label. Private:Only by 1. The function in the class, 2. Its friend function is accessed. The object of the class cannot be accessed by any other access.protected:can be 1. A function in this
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.