Encapsulation is the process of wrapping up data and members of a class. It is an approach to hidding the irrelevant
information and showing only the relevant information of a specific object to a user.
Encapsulation restricts users from sharing and manipulating data , thereby minimizing the chances of data curruption and unauthorized
access of data.
Points to Remember
What is Extension Method in C# ? Describe it in details.
Extension Method is a method that helps us to extend a class without creating a new derived class or without modifying
the original class. Extension method works as a Static method but it is invoked with an instance of the extended
class.
The Extension Method can be any Static Method which uses this keyword before its first parameter.
Only a class that has Static members and implements the this Keyword in the first parameter of a static method can use
the extension methods.
Difference Between Static Method and Extension Method