Code
- Program.cs
- Player.cs
- Monster.cs
- Creature.cs
- Game.cs
Class className : parentClassName
- Inheritance
- inheritance of the characteristics of the parent concept
Access Modifier
- public
- Can access the member from anywhere
- protected
- Not accessible from outside the class
- Accessible from the derived class
- private
- Accessible only from within the class.
base & this
- base()
- Access members of the base class within the derived class
- this
- Point to the current instance of the class
Constructor
- Constructor
- A method whose name is the same as the name of that type
- The method signature contains only a list of method names and parameters and does not include a return type
- To set defaults, limit instantiation, and write flexible, readable code