I was looking at this microsoft article on abstract classes. The article says
Abstract classes cannot be used for:
• Variables or member data
• Argument types
• Function return types
• Types of explicit conversions
If I understand correctly, this quote means that Abstract class type cannot be a member of another class, argument of another function or return type of another function.
What is the meaning of
Types of explicit conversions
Does this mean that we cannot typecast something like (BaseClass)obj1
where obj1
is of another class type? If this understanding is true, when casting one object to another class type may be necessary?