Oops 12
Oops 12
• A class or struct definition is like a blueprint that specifies what the type can
do.
• An object is basically a block of memory that has been allocated and
configured according to the blueprint.
• A program may create many objects of the same class.
• Objects are also called instances, and they can be stored in either a named
variable or in an array or collection.
2. What is Encapsulation?
Encapsulation is a process of binding the data members and member functions
into a single unit.
3. What is Abstraction?
Abstraction is a process of hiding the implementation details and displaying the
essential features.
• The public can be accessible outside the class through object reference.
• Private can be accessible inside the class only through member functions.
• Protected can be just like private but accessible in derived classes also through
member functions.
• Internal can be visible inside the assembly. Accessible through objects.
• Protected Internal can be visible inside the assembly through objects and in
derived classes outside the assembly through member functions.
5. What is Inheritance?
Inheritance is a process of deriving a new class from an already existing class.
6. How can you implement multiple inheritance in C#?
Using Interfaces, you can implement multiple inheritance in C#.